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 TypingContextDEFAULTEmpty context.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypingContextandThen(Map<JVariableSymbol,@Nullable JTypeMirror> map)Return a new typing context which uses this one as a parent.TypingContextandThenZip(List<JVariableSymbol> symbols, List<? extends JTypeMirror> types)@Nullable JTypeMirrorapply(JVariableSymbol var)protected Map<T,R>getMap()booleanisEmpty()StringtoString()static TypingContextzip(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<? extends JTypeMirror> types)
-
zip
public static TypingContext zip(List<JVariableSymbol> symbols, List<JTypeMirror> types)
-
getMap
protected Map<T,R> getMap()
-
isEmpty
public boolean isEmpty()
-
-