Modifier and Type | Method and Description |
---|---|
static Pattern |
createPatternWithFreeVariables(Iterable<? extends TreePath> pattern,
Map<String,TypeMirror> variable2Type)
Creates a pattern that contains free variables for multiple consequent patterns.
|
static Pattern |
createPatternWithFreeVariables(TreePath pattern,
Map<String,TypeMirror> variable2Type)
Creates a pattern that contains free variables.
|
static Pattern |
createPatternWithRemappableVariables(Iterable<? extends TreePath> pattern,
Collection<? extends VariableElement> remappable,
boolean allowRemapToTrees) |
static Pattern |
createPatternWithRemappableVariables(TreePath pattern,
Collection<? extends VariableElement> remappable,
boolean allowRemapToTrees) |
static Pattern |
createSimplePattern(Iterable<? extends TreePath> pattern)
Creates a simple pattern for multiple consequent patterns.
|
static Pattern |
createSimplePattern(TreePath pattern)
Creates a simple pattern.
|
@NonNull public static Pattern createSimplePattern(@NonNull TreePath pattern)
pattern
- to search for@NonNull public static Pattern createSimplePattern(@NonNull Iterable<? extends TreePath> pattern)
pattern
- to search for@NonNull public static Pattern createPatternWithFreeVariables(@NonNull TreePath pattern, @NonNull Map<String,TypeMirror> variable2Type)
IdentifierTree
which name starts with the dollar ('$') sign.
If the variable name ends with the dollar sign, it is considered to be a "multivariable",
which means that any number of consequent tree node can be added to that variable.
There may be a type constraint specified for each of the variables. If such
a constraint is specified, the variable will be bound only to tree node which
type is assignable to the constraint.
TODO: variables for names
TODO: repeated variablespattern
- to search forvariable2Type
- @NonNull public static Pattern createPatternWithFreeVariables(@NonNull Iterable<? extends TreePath> pattern, @NonNull Map<String,TypeMirror> variable2Type)
IdentifierTree
which name starts with the dollar ('$') sign.
If the variable name ends with the dollar sign, it is considered to be a "multivariable",
which means that any number of consequent tree node can be added to that variable.
There may be a type constraint specified for each of the variables. If such
a constraint is specified, the variable will be bound only to tree node which
type is assignable to the constraint.
TODO: variables for names
TODO: repeated variablespattern
- to search forvariable2Type
- @NonNull public static Pattern createPatternWithRemappableVariables(@NonNull TreePath pattern, @NonNull Collection<? extends VariableElement> remappable, boolean allowRemapToTrees)
@NonNull public static Pattern createPatternWithRemappableVariables(@NonNull Iterable<? extends TreePath> pattern, @NonNull Collection<? extends VariableElement> remappable, boolean allowRemapToTrees)