Package net.jangaroo.jooc.types
Class ExpressionType
- java.lang.Object
-
- net.jangaroo.jooc.types.ExpressionType
-
- Direct Known Subclasses:
FunctionSignature
public class ExpressionType extends Object
The type of an expression.
-
-
Constructor Summary
Constructors Constructor Description ExpressionType(Type type)ExpressionType(TypeDeclaration declaration)ExpressionType(TypeDeclaration declaration, ExpressionType typeParameter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)net.jangaroo.utils.AS3TypegetAS3Type()TypeDeclarationgetDeclaration()ExpressionTypegetEvalType()TypegetType()ExpressionTypegetTypeParameter()inthashCode()booleanisArrayLike()booleanisAssignableTo(ExpressionType toCheck)Return whether the given expression type is more general than this expression type, so that anything of this expression type could be assigned to a variable of the given expression type.booleanisConfigType()static booleanisNumber(net.jangaroo.utils.AS3Type type)booleanisObject()booleanmarkAsConfigTypeIfPossible()IdeDeclarationresolvePropertyDeclaration(String memberName)StringtoString()static StringtoString(ExpressionType type)
-
-
-
Constructor Detail
-
ExpressionType
public ExpressionType(@Nonnull TypeDeclaration declaration)
-
ExpressionType
public ExpressionType(@Nonnull TypeDeclaration declaration, @Nullable ExpressionType typeParameter)
-
-
Method Detail
-
isConfigType
public boolean isConfigType()
-
markAsConfigTypeIfPossible
public boolean markAsConfigTypeIfPossible()
-
getEvalType
public ExpressionType getEvalType()
-
getAS3Type
@Nonnull public net.jangaroo.utils.AS3Type getAS3Type()
-
getDeclaration
@Nonnull public TypeDeclaration getDeclaration()
-
getTypeParameter
@Nullable public ExpressionType getTypeParameter()
-
isObject
public boolean isObject()
-
isArrayLike
public boolean isArrayLike()
-
resolvePropertyDeclaration
public IdeDeclaration resolvePropertyDeclaration(String memberName)
-
isAssignableTo
public boolean isAssignableTo(@Nonnull ExpressionType toCheck)
Return whether the given expression type is more general than this expression type, so that anything of this expression type could be assigned to a variable of the given expression type.- Parameters:
toCheck- the expression type of the variable to assign- Returns:
- whether the assignment to an expression of this type is valid
-
isNumber
public static boolean isNumber(net.jangaroo.utils.AS3Type type)
-
toString
public static String toString(ExpressionType type)
-
-