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 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(IType enclosingType, boolean forFunction)TypeVariableDefinition(IType enclosingType, IGenericTypeVariable typeVar)TypeVariableDefinition(IType enclosingType, IGenericTypeVariable typeVar, TypeVariableDefinitionImpl typeVarDef, TypeVariableType typeVarType)
-
Method Summary
-
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
-
-
-
-
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)
-
-
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 String getName()
- Specified by:
getNamein interfaceITypeVariableDefinition
-
setName
public void setName(String strName)
-
getTypeVar
public GenericTypeVariable getTypeVar()
- Specified by:
getTypeVarin interfaceITypeVariableDefinition
-
evaluate
public Object evaluate()
- Specified by:
evaluatein interfaceIExpression- Overrides:
evaluatein classExpression
-
toString
public String toString()
Description copied from class:ExpressionSubclasses should return a String representing the parsed expression.- Specified by:
toStringin classExpression
-
getTypeVars
public static IGenericTypeVariable[] getTypeVars(List<ITypeVariableDefinitionExpression> typeVarDefs)
-
getNameOffset
public int getNameOffset(String identifierName)
- Specified by:
getNameOffsetin interfaceIParsedElementWithAtLeastOneDeclaration
-
setNameOffset
public void setNameOffset(int iOffset, String identifierName)- Specified by:
setNameOffsetin interfaceIParsedElementWithAtLeastOneDeclaration
-
declares
public boolean declares(String identifierName)
- Specified by:
declaresin interfaceIParsedElementWithAtLeastOneDeclaration
-
getDeclarations
public String[] getDeclarations()
- Specified by:
getDeclarationsin interfaceIParsedElementWithAtLeastOneDeclaration
-
clone
public ITypeVariableDefinition clone()
- Specified by:
clonein interfaceITypeVariableDefinition- Overrides:
clonein classObject
-
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)
-
-