Package de.svws_nrw.transpiler
Klasse ExpressionClassType
java.lang.Object
de.svws_nrw.transpiler.ExpressionType
de.svws_nrw.transpiler.ExpressionClassType
- Alle implementierten Schnittstellen:
Tree
The specialized
ExpressionType
if the type is a class type.-
Verschachtelte Klassen - Übersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Returns whether the object parameter ist equal to this expression type or notstatic ExpressionClassType
getExpressionAnnotationType
(String name, String packageName) Creates a new expression annotation type instance from the specified paramaters.static ExpressionClassType
getExpressionClassType
(Transpiler transpiler, IdentifierTree node) Create a new class type instance for the specified identifier node object.static ExpressionClassType
getExpressionClassType
(Transpiler transpiler, MemberSelectTree tree) Creates a new expression class type instance from the specifiedMemberSelectTree
static ExpressionClassType
getExpressionClassType
(Transpiler transpiler, ParameterizedTypeTree tree) Creates a new expression class type instance from the specifiedParameterizedTypeTree
static ExpressionClassType
getExpressionClassType
(Transpiler transpiler, ExpressionClassType clParamType) Creates a new parameterized expression class type instance for java.lang.Class with the specified parameter class type.static ExpressionClassType
getExpressionClassType
(Transpiler transpiler, TypeElement elem) Creates a new expression class type instance from the specifiedTypeElement
static ExpressionClassType
getExpressionClassType
(Transpiler transpiler, TypeMirror type) Creates a new expression class type instance from the specifiedTypeMirror
static ExpressionClassType
getExpressionInterfaceType
(String name, String packageName) Creates a new expression interface type instance from the specified paramaters.static ExpressionClassType
Creates a new expression class type instance for the unknown super class.Returns the full qualified name of the class, i.e. without the list of type parameters if type parameters existReturns the package name.int
Returns the number of type arguments/variables of this class type.Returns the list of type arguments of this class.Returns the list of type variables of this class.int
hashCode()
Returns the hashCode for the expression type.int
isAssignable
(Transpiler transpiler, ExpressionType other) Checks whether a values of the specified type other is assignable to a variable of this type or not.boolean
Checks whether this type is an integer type.boolean
Checks whether this type is a numeric or boxed numeric type.boolean
Returns whether the type is a primitive type or a boxed primitive type.boolean
resolveTypeVariables
(Map<String, ExpressionType> knownTypeVars) Resolves the type variables using the specified map and writes the expression type into the typeArguments list.toString()
Von Klasse geerbte Methoden de.svws_nrw.transpiler.ExpressionType
accept, getExpressionType, getExpressionType, getKind, isString
-
Methodendetails
-
getExpressionInterfaceType
Creates a new expression interface type instance from the specified paramaters.- Parameter:
name
- the interface namepackageName
- the packagename of the interface- Gibt zurück:
- the new expression class type instance
-
getExpressionAnnotationType
Creates a new expression annotation type instance from the specified paramaters.- Parameter:
name
- the annotation namepackageName
- the packagename of the annotation- Gibt zurück:
- the new expression class type instance
-
getExpressionSuperClassType
Creates a new expression class type instance for the unknown super class.- Gibt zurück:
- the new expression class type instance
-
getExpressionClassType
public static ExpressionClassType getExpressionClassType(Transpiler transpiler, TypeMirror type) throws TranspilerException Creates a new expression class type instance from the specifiedTypeMirror
- Parameter:
transpiler
- the transpiler used for determining the expression typetype
- the type mirror- Gibt zurück:
- the new expression class type instance
- Löst aus:
TranspilerException
- an exception if analyzing the type arguments fails
-
getExpressionClassType
Creates a new expression class type instance from the specifiedTypeElement
- Parameter:
transpiler
- the transpiler used for determining the expression typeelem
- the type element- Gibt zurück:
- the new expression class type instance
-
getExpressionClassType
public static ExpressionClassType getExpressionClassType(Transpiler transpiler, ParameterizedTypeTree tree) Creates a new expression class type instance from the specifiedParameterizedTypeTree
- Parameter:
transpiler
- the transpiler used for determining the expression typetree
- the parameterized type tree node- Gibt zurück:
- the new expression class type instance
-
getExpressionClassType
public static ExpressionClassType getExpressionClassType(Transpiler transpiler, MemberSelectTree tree) Creates a new expression class type instance from the specifiedMemberSelectTree
- Parameter:
transpiler
- the transpiler used for determining the expression typetree
- the member select type tree node- Gibt zurück:
- the new expression class type instance
-
getExpressionClassType
public static ExpressionClassType getExpressionClassType(Transpiler transpiler, ExpressionClassType clParamType) Creates a new parameterized expression class type instance for java.lang.Class with the specified parameter class type.- Parameter:
transpiler
- the transpiler used for determining the expression typeclParamType
- the parameter class type- Gibt zurück:
- the new expression class type instance
-
getExpressionClassType
public static ExpressionClassType getExpressionClassType(Transpiler transpiler, IdentifierTree node) Create a new class type instance for the specified identifier node object.- Parameter:
transpiler
- the transpiler used for determining the expression typenode
- the identifier node instance- Gibt zurück:
- the new expression class type instance or null on error
-
getPackageName
Returns the package name.- Gibt zurück:
- the package name
-
getFullQualifiedName
Returns the full qualified name of the class, i.e. without the list of type parameters if type parameters exist- Gibt zurück:
- the full qualified name of the class
-
getTypeArgumentCount
public int getTypeArgumentCount()Returns the number of type arguments/variables of this class type.- Gibt zurück:
- the number of type arguments/variables
-
resolveTypeVariables
Resolves the type variables using the specified map and writes the expression type into the typeArguments list.- Parameter:
knownTypeVars
- the mapping of type variables to the type arguments- Gibt zurück:
- true on success and false if not all type variables could be resolved
-
getTypeArguments
Returns the list of type arguments of this class. If no type arguments are available an empty list is returned.- Gibt zurück:
- the list of type arguments
-
getTypeVariables
Returns the list of type variables of this class. If no type variables are available an empty list is returned.- Gibt zurück:
- the list of type variables
-
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 KlasseExpressionType
- Gibt zurück:
- true if it is a primitive type and false otherwise
-
isNumberType
public boolean isNumberType()Beschreibung aus Klasse kopiert:ExpressionType
Checks whether this type is a numeric or boxed numeric type. The method is an override in the subclassesExpressionPrimitiveType
andExpressionClassType
.- Setzt außer Kraft:
isNumberType
in KlasseExpressionType
- Gibt zurück:
- true if it is a numeric type and false otherwise.
-
isIntegerType
public boolean isIntegerType()Beschreibung aus Klasse kopiert:ExpressionType
Checks whether this type is an integer type. The method is an override in the subclassesExpressionPrimitiveType
andExpressionClassType
.- Setzt außer Kraft:
isIntegerType
in KlasseExpressionType
- Gibt zurück:
- true if it is an integer type and false otherwise.
-
isAssignable
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 KlasseExpressionType
- Parameter:
transpiler
- the transpiler object used for utility methodsother
- the other type- Gibt zurück:
- a postive value or zero if the type is assignable and a negative value if not.
-
toString
-
hashCode
public int hashCode()Beschreibung aus Klasse kopiert:ExpressionType
Returns the hashCode for the expression type.- Setzt außer Kraft:
hashCode
in KlasseExpressionType
- Gibt zurück:
- the hash code
-
equals
Beschreibung aus Klasse kopiert:ExpressionType
Returns whether the object parameter ist equal to this expression type or not- Setzt außer Kraft:
equals
in KlasseExpressionType
- Gibt zurück:
- true if both are equal
-