Class TypingContext
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.types.TypingContext
-
- All Implemented Interfaces:
Function<JVariableSymbol,JTypeMirror>
public final class TypingContext extends Object
A mapping of variables to types.
-
-
Field Summary
Fields Modifier and Type Field Description static TypingContext
DEFAULT
Empty context.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypingContext
andThen(Map<JVariableSymbol,@Nullable JTypeMirror> map)
Return a new typing context which uses this one as a parent.TypingContext
andThenZip(List<JVariableSymbol> symbols, List<JTypeMirror> types)
@Nullable JTypeMirror
apply(JVariableSymbol var)
protected Map<T,R>
getMap()
boolean
isEmpty()
String
toString()
static TypingContext
zip(List<JVariableSymbol> symbols, List<JTypeMirror> types)
-
-
-
Field Detail
-
DEFAULT
public static final TypingContext DEFAULT
Empty context. Corresponds to defaulting all lambda param types to their value in the AST.
-
-
Method Detail
-
apply
public @Nullable JTypeMirror apply(JVariableSymbol var)
-
andThen
public TypingContext andThen(Map<JVariableSymbol,@Nullable JTypeMirror> map)
Return a new typing context which uses this one as a parent.
-
andThenZip
public TypingContext andThenZip(List<JVariableSymbol> symbols, List<JTypeMirror> types)
-
zip
public static TypingContext zip(List<JVariableSymbol> symbols, List<JTypeMirror> types)
-
getMap
protected Map<T,R> getMap()
-
isEmpty
public boolean isEmpty()
-
-