Klasse ExpressionTypeLambda

java.lang.Object
de.svws_nrw.transpiler.ExpressionType
de.svws_nrw.transpiler.ExpressionTypeLambda
Alle implementierten Schnittstellen:
Tree

public final class ExpressionTypeLambda extends ExpressionType
The specialized ExpressionType if the type is a class type.
  • Methodendetails

    • getExpressionTypeLambda

      public static ExpressionTypeLambda getExpressionTypeLambda(Transpiler transpiler, LambdaExpressionTree tree)
      Creates a new lambda expression type instance from the specified LambdaExpressionTree
      Parameter:
      transpiler - the transpiler used for determining the expression type
      tree - the lambda expression tree node
      Gibt zurück:
      the new lambda expression type instance
    • getResultType

      public ExpressionType getResultType()
      Returns the resulting type of this lambda expression type
      Gibt zurück:
      the resulting type of this lambda expression type
    • getParamTypes

      public List<ExpressionType> getParamTypes()
      Returns the parameter types of this lambda expression type
      Gibt zurück:
      the parameter types
    • getFunctionalInterfaceName

      public String getFunctionalInterfaceName(Transpiler transpiler)
      Returns the name of the functional interface that is implemented with this lambda expression.
      Parameter:
      transpiler - the transpiler used for getting further information about the functional interface
      Gibt zurück:
      the name of the functional interface
    • getFunctionalInterfaceMethodName

      public String getFunctionalInterfaceMethodName(Transpiler transpiler)
      Returns the name of the abstract method of the functional interface that is implemented with this lambda expression.
      Parameter:
      transpiler - the transpiler used for getting further information about the functional interface
      Gibt zurück:
      the name of the abstract method of the functional interface that is implemented with this lambda expression
    • isAssignable

      public int isAssignable(Transpiler transpiler, ExpressionType other)
      Beschreibung aus Klasse kopiert: ExpressionType
      Checks whether a values of the specified type other is assignable to a variable of this type or not. If a value of that type is not assignable a negative value is returned. A zero or positive value is returned if it is assignable. A zero value indicates a perfect type match and greater values indicate a less perfect type match, e.g. unboxing of a primitive type is required or the a value of a sub class type should be assigned.
      Angegeben von:
      isAssignable in Klasse ExpressionType
      Parameter:
      transpiler - the transpiler object used for utility methods
      other - the other type
      Gibt zurück:
      a postive value or zero if the type is assignable and a negative value if not.
    • isPrimitiveOrBoxedPrimitive

      public boolean isPrimitiveOrBoxedPrimitive()
      Beschreibung aus Klasse kopiert: ExpressionType
      Returns whether the type is a primitive type or a boxed primitive type.
      Angegeben von:
      isPrimitiveOrBoxedPrimitive in Klasse ExpressionType
      Gibt zurück:
      true if it is a primitive type and false otherwise
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • hashCode

      public int hashCode()
      Beschreibung aus Klasse kopiert: ExpressionType
      Returns the hashCode for the expression type.
      Setzt außer Kraft:
      hashCode in Klasse ExpressionType
      Gibt zurück:
      the hash code
    • equals

      public boolean equals(Object obj)
      Beschreibung aus Klasse kopiert: ExpressionType
      Returns whether the object parameter ist equal to this expression type or not
      Setzt außer Kraft:
      equals in Klasse ExpressionType
      Gibt zurück:
      true if both are equal