Class TypeVariableDefinition
- java.lang.Object
-
- gw.internal.gosu.parser.ParsedElement
-
- gw.internal.gosu.parser.Expression
-
- gw.internal.gosu.parser.expressions.TypeVariableDefinition
-
- All Implemented Interfaces:
ITypeVariableDefinition,ITypeVariableDefinitionExpression,IExpression,IHasType,IParsedElement,IParsedElementWithAtLeastOneDeclaration
public class TypeVariableDefinition extends Expression implements ITypeVariableDefinition, ITypeVariableDefinitionExpression
-
-
Field Summary
Fields Modifier and Type Field Description (package private) TypeVariableDefinitionImpl_typeVarDef-
Fields inherited from class gw.internal.gosu.parser.Expression
_type
-
Fields inherited from class gw.internal.gosu.parser.ParsedElement
_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULE
-
Fields inherited from interface gw.lang.parser.IExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description TypeVariableDefinition(TypeVariableDefinitionImpl typeVarDef, boolean isFunctionStatement)TypeVariableDefinition(IType enclosingType, boolean forFunction)TypeVariableDefinition(IType enclosingType, IGenericTypeVariable typeVar)TypeVariableDefinition(IType enclosingType, IGenericTypeVariable typeVar, TypeVariableDefinitionImpl typeVarDef, TypeVariableType typeVarType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ITypeVariableDefinitionclone()booleandeclares(java.lang.String identifierName)booleanequals(java.lang.Object o)java.lang.Objectevaluate()Evaluates this Expression and returns the result.ITypegetBoundingType()java.lang.String[]getDeclarations()ITypegetEnclosingType()java.lang.StringgetName()intgetNameOffset(java.lang.String identifierName)The offset of the token representing the name for the declarationTypeVariableTypegetType()Returns this Expression's IType.TypeVariableTypegetTypeImpl()GenericTypeVariablegetTypeVar()ITypeVariableDefinitiongetTypeVarDef()static IGenericTypeVariable[]getTypeVars(java.util.List<ITypeVariableDefinitionExpression> typeVarDefs)VariancegetVariance()inthashCode()voidsetBoundingType(IType type)voidsetEnclosingType(IType enclosingType)voidsetName(java.lang.String strName)voidsetNameOffset(int iOffset, java.lang.String identifierName)voidsetType(IType type)Sets this Expression's IType.voidsetTypeVarDef(TypeVariableDefinitionImpl typeVarDef)voidsetVariance(Variance variance)java.lang.StringtoString()Subclasses should return a String representing the parsed expression.-
Methods inherited from class gw.internal.gosu.parser.Expression
evaluate, getContextType, getReturnType, isNullSafe, isUnchecked
-
Methods inherited from class gw.internal.gosu.parser.ParsedElement
addExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findDeclaringStatement, findLineNumberOfDeclaration, findRootParsedElement, getAnnotations, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, initEmptyParseTree, initLocation, isCompileTimeConstant, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setParent, setSynthetic, shouldClearParseInfo, visit
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.parser.IParsedElement
addExceptionsFrom, addParseException, addParseException, addParseWarning, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findDeclaringStatement, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getReturnType, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, isCompileTimeConstant, isSuppressed, isSynthetic, setLocation, setParent, visit
-
-
-
-
Field Detail
-
_typeVarDef
TypeVariableDefinitionImpl _typeVarDef
-
-
Constructor Detail
-
TypeVariableDefinition
public TypeVariableDefinition(IType enclosingType, boolean forFunction)
-
TypeVariableDefinition
public TypeVariableDefinition(IType enclosingType, IGenericTypeVariable typeVar)
-
TypeVariableDefinition
public TypeVariableDefinition(IType enclosingType, IGenericTypeVariable typeVar, TypeVariableDefinitionImpl typeVarDef, TypeVariableType typeVarType)
-
TypeVariableDefinition
public TypeVariableDefinition(TypeVariableDefinitionImpl typeVarDef, boolean isFunctionStatement)
-
-
Method Detail
-
getType
public TypeVariableType getType()
Description copied from class:ExpressionReturns this Expression's IType.- Specified by:
getTypein interfaceIHasType- Specified by:
getTypein interfaceITypeVariableDefinition- Overrides:
getTypein classExpression
-
getTypeImpl
public TypeVariableType getTypeImpl()
- Overrides:
getTypeImplin classExpression
-
setType
public void setType(IType type)
Description copied from class:ExpressionSets this Expression's IType.- Overrides:
setTypein classExpression
-
getEnclosingType
public IType getEnclosingType()
- Specified by:
getEnclosingTypein interfaceITypeVariableDefinition
-
setEnclosingType
public void setEnclosingType(IType enclosingType)
- Specified by:
setEnclosingTypein interfaceITypeVariableDefinition
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceITypeVariableDefinition
-
setName
public void setName(java.lang.String strName)
-
getTypeVar
public GenericTypeVariable getTypeVar()
- Specified by:
getTypeVarin interfaceITypeVariableDefinition
-
evaluate
public java.lang.Object evaluate()
Description copied from interface:IExpressionEvaluates this Expression and returns the result.- Specified by:
evaluatein interfaceIExpression- Overrides:
evaluatein classExpression
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Description copied from class:ExpressionSubclasses should return a String representing the parsed expression.- Specified by:
toStringin classExpression
-
getTypeVars
public static IGenericTypeVariable[] getTypeVars(java.util.List<ITypeVariableDefinitionExpression> typeVarDefs)
-
getNameOffset
public int getNameOffset(java.lang.String identifierName)
Description copied from interface:IParsedElementWithAtLeastOneDeclarationThe offset of the token representing the name for the declaration- Specified by:
getNameOffsetin interfaceIParsedElementWithAtLeastOneDeclaration
-
setNameOffset
public void setNameOffset(int iOffset, java.lang.String identifierName)- Specified by:
setNameOffsetin interfaceIParsedElementWithAtLeastOneDeclaration
-
declares
public boolean declares(java.lang.String identifierName)
- Specified by:
declaresin interfaceIParsedElementWithAtLeastOneDeclaration- Returns:
- True if this statement declares the given identifier; false otherwise
-
getDeclarations
public java.lang.String[] getDeclarations()
- Specified by:
getDeclarationsin interfaceIParsedElementWithAtLeastOneDeclaration- Returns:
- all names declared by this element
-
clone
public ITypeVariableDefinition clone()
- Specified by:
clonein interfaceITypeVariableDefinition- Overrides:
clonein classjava.lang.Object
-
getBoundingType
public IType getBoundingType()
- Specified by:
getBoundingTypein interfaceITypeVariableDefinition
-
setBoundingType
public void setBoundingType(IType type)
-
getVariance
public Variance getVariance()
- Specified by:
getVariancein interfaceITypeVariableDefinition
-
setVariance
public void setVariance(Variance variance)
- Specified by:
setVariancein interfaceITypeVariableDefinition
-
getTypeVarDef
public ITypeVariableDefinition getTypeVarDef()
- Specified by:
getTypeVarDefin interfaceITypeVariableDefinitionExpression
-
setTypeVarDef
public void setTypeVarDef(TypeVariableDefinitionImpl typeVarDef)
-
-