Package de.svws_nrw.transpiler
Klasse ExpressionTypeVar
java.lang.Object
de.svws_nrw.transpiler.ExpressionType
de.svws_nrw.transpiler.ExpressionTypeVar
- Alle implementierten Schnittstellen:
Tree
The specialized
ExpressionType
if the type is a type
variable, e.g. the type variable "T" used in the type "Comparable T".-
Verschachtelte Klassen - Übersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Returns whether the object parameter ist equal to this expression type or notstatic ExpressionTypeVar
getExpressionTypeVariable
(Transpiler transpiler, Tree type) Creates a new type variable expression type instance from the specifiedTree
static ExpressionTypeVar
getExpressionTypeVariable
(Transpiler transpiler, TypeMirror type) Creates a new type variable expression type instance from the specifiedTypeMirror
Returns the extends bound expression type if this type variable is a wildcard type of kind '?getName()
Returns the name of the type variableReturns the super bound expression type if this type variable is a wildcard type of kind '?static ExpressionTypeVar
Creates a new wildcard (?)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
Returns whether the type is a primitive type or a boxed primitive type.boolean
Returns true if this type variable is a wildcard type with or without bounds (extends or super).toString()
Von Klasse geerbte Methoden de.svws_nrw.transpiler.ExpressionType
accept, getExpressionType, getExpressionType, getKind, isIntegerType, isNumberType, isString
-
Methodendetails
-
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
-
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.
-
getExpressionTypeVariable
public static ExpressionTypeVar getExpressionTypeVariable(Transpiler transpiler, Tree type) throws TranspilerException Creates a new type variable expression type instance from the specifiedTree
- Parameter:
transpiler
- the transpiler used for determining the expression typetype
- the type tree node- Gibt zurück:
- the new type variable expression type instance
- Löst aus:
TranspilerException
- an exception if analyzing the type arguments fails
-
getWildcardExpressionTypeVariable
Creates a new wildcard (?) type variable expression type instance.- Gibt zurück:
- the new type variable expression type instance
-
getExpressionTypeVariable
public static ExpressionTypeVar getExpressionTypeVariable(Transpiler transpiler, TypeMirror type) throws TranspilerException Creates a new type variable expression type instance from the specifiedTypeMirror
- Parameter:
transpiler
- the transpiler used for determining the expression typetype
- the type mirror- Gibt zurück:
- the new type variable expression type instance
- Löst aus:
TranspilerException
- an exception if analyzing the type arguments fails
-
isWildcard
public boolean isWildcard()Returns true if this type variable is a wildcard type with or without bounds (extends or super).- Gibt zurück:
- true if this type varirable ist a wildcard type variable and false otherwise
-
getName
Returns the name of the type variable- Gibt zurück:
- the name of the type variable
-
getExtendsBound
Returns the extends bound expression type if this type variable is a wildcard type of kind '? extends T'.- Gibt zurück:
- the extends bound
-
getSuperBound
Returns the super bound expression type if this type variable is a wildcard type of kind '? super T'.- Gibt zurück:
- the super bound expression type
-
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
-