Class TypeManager.LambdaType

java.lang.Object
de.inetsoftware.jwebassembly.module.TypeManager.StructType
de.inetsoftware.jwebassembly.module.TypeManager.LambdaType
All Implemented Interfaces:
AnyType
Enclosing class:
TypeManager

class TypeManager.LambdaType extends TypeManager.StructType
A generated type that represent a lambda expression
  • Field Details

  • Constructor Details

    • LambdaType

      LambdaType(@Nonnull String name, @Nonnull BootstrapMethod method, ArrayList<AnyType> params, TypeManager.StructType interfaceType, FunctionName syntheticLambdaFunctionName, String interfaceMethodName, @Nonnull TypeManager manager)
      Create a lambda type
      Parameters:
      name - the Lambda Java class name
      method - the name BootstrapMethod from the parsed class file
      params - the parameters of the constructor and type fields
      interfaceType - the implemented interface type
      syntheticLambdaFunctionName - the real method in the parent class that implements the lambda expression
      interfaceMethodName - the name of the implemented method in the interface
      manager - the manager which hold all StructTypes
  • Method Details

    • getParamFields

      ArrayList<NamedStorageType> getParamFields()
      The parameters of the constructor
      Returns:
      the parameters
    • getInterfaceType

      TypeManager.StructType getInterfaceType()
      The implemented interface type
      Returns:
      the interface type
    • getLambdaMethod

      @Nonnull FunctionName getLambdaMethod()
      The real method in the parent class that implements the lambda expression
      Returns:
      the function name
    • getInterfaceMethodName

      String getInterfaceMethodName()
      The name of the implemented method in the interface
      Returns:
      the name
    • isSubTypeOf

      public boolean isSubTypeOf(AnyType type)
      Check if this is a sub type of given type.
      Specified by:
      isSubTypeOf in interface AnyType
      Overrides:
      isSubTypeOf in class TypeManager.StructType
      Parameters:
      type - type to check
      Returns:
      true, if both are identical or this is a sub type of other. Or if other is a parent type of this.