Class SyntheticLambdaMethod


  • public class SyntheticLambdaMethod
    extends Object
    A lambda body pending materialization as a synthetic class method, with its captured variables and declared parameters.
    • 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 name
        descriptor - the method descriptor
        isStatic - whether the synthetic method is static
        captures - the captured variables; null means none
        body - the lambda body node
        parameters - the declared lambda parameters; null means none
        returnType - 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
      • getBody

        public ASTNode getBody()
        Returns:
        the body
      • getReturnType

        public SourceType getReturnType()
        Returns:
        the return type
      • getTotalParameterCount

        public int getTotalParameterCount()
        Returns:
        the number of captures plus declared parameters