Package com.tonic.analysis.source.lower
Class SyntheticLambdaMethod
- java.lang.Object
-
- com.tonic.analysis.source.lower.SyntheticLambdaMethod
-
public class SyntheticLambdaMethod extends Object
A lambda body pending materialization as a synthetic class method, with its captured variables and declared parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyntheticLambdaMethod.CapturedVariableA variable captured from the enclosing scope, by name and type.
-
Constructor Summary
Constructors Constructor Description SyntheticLambdaMethod(String name, String descriptor, boolean isStatic, List<SyntheticLambdaMethod.CapturedVariable> captures, ASTNode body, List<LambdaParameter> parameters, SourceType returnType)Creates the synthetic lambda method description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ASTNodegetBody()List<SyntheticLambdaMethod.CapturedVariable>getCaptures()StringgetDescriptor()StringgetName()List<LambdaParameter>getParameters()SourceTypegetReturnType()intgetTotalParameterCount()booleanisStatic()
-
-
-
Constructor Detail
-
SyntheticLambdaMethod
public SyntheticLambdaMethod(String name, String descriptor, boolean isStatic, List<SyntheticLambdaMethod.CapturedVariable> captures, ASTNode body, List<LambdaParameter> parameters, SourceType returnType)
Creates the synthetic lambda method description.- Parameters:
name- the synthetic method namedescriptor- the method descriptorisStatic- whether the synthetic method is staticcaptures- the captured variables; null means nonebody- the lambda body nodeparameters- the declared lambda parameters; null means nonereturnType- the lambda return type
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name
-
getDescriptor
public String getDescriptor()
- Returns:
- the descriptor
-
isStatic
public boolean isStatic()
- Returns:
- whether static
-
getCaptures
public List<SyntheticLambdaMethod.CapturedVariable> getCaptures()
- Returns:
- the captures
-
getBody
public ASTNode getBody()
- Returns:
- the body
-
getParameters
public List<LambdaParameter> getParameters()
- Returns:
- the parameters
-
getReturnType
public SourceType getReturnType()
- Returns:
- the return type
-
getTotalParameterCount
public int getTotalParameterCount()
- Returns:
- the number of captures plus declared parameters
-
-