Package gw.internal.gosu.parser
Class GosuClass
- java.lang.Object
-
- gw.lang.reflect.AbstractType
-
- gw.lang.reflect.InnerClassCapableType
-
- gw.internal.gosu.parser.GosuClass
-
- All Implemented Interfaces:
ICompilableTypeInternal,IGosuClassInternal,IParameterizableType,IFileRepositoryBasedType,IHasInnerClass,ICompilableType,IGosuClass,ICanBeAnnotation,IEnhanceableType,IEnumData,IEnumType,IHasJavaClass,IType,java.io.Serializable,java.lang.Comparable
- Direct Known Subclasses:
GosuClassFragment,GosuEnhancement,GosuProgram,SyntheticClass
public class GosuClass extends InnerClassCapableType implements IGosuClassInternal
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gw.lang.reflect.gs.IGosuClass
IGosuClass.ProxyUtil
-
Nested classes/interfaces inherited from interface gw.internal.gosu.parser.IGosuClassInternal
IGosuClassInternal.Util
-
-
Field Summary
-
Fields inherited from interface gw.lang.reflect.gs.IGosuClass
ANONYMOUS_PREFIX, PROXY_PREFIX, SUPER_PROXY_CLASS_PREFIX
-
Fields inherited from interface gw.lang.reflect.IType
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGosuClass(IGosuClass genericClass, IType[] typeParams)protectedGosuClass(IGosuClass genericClass, IType[] typeParams, boolean bCopyState)GosuClass(java.lang.String strNamespace, java.lang.String strRelativeName, GosuClassTypeLoader classTypeLoader, ISourceFileHandle sourceFile, ITypeUsesMap typeUsesMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBlock(IBlockClass block)voidaddCapturedSymbol(ICapturedSymbol sym)voidaddDelegateImpls(ISymbolTable symTable, GosuClassParser parser)voidaddInnerClass(IGosuClassInternal innerGsClass)voidaddInterface(IType type)private voidaddJavaEnhancements(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic, IJavaType type)private booleanareSymbolsFromSameDeclaration(IVarStatement varStmt, ISymbol existingSymbol)private voidassignParameterizedInterfaces()private voidassignParameterizedJavaTypeIfProxy()private voidassignParameterizedSuperType()voidassignTypeUsesMap(GosuParser parser)voidassignTypeVarsFromTypeParams(IType[] typeParams)Note a gosu class can be BOTH parameterzied AND generic.intcompareTo(java.lang.Object o)byte[]compile()voidcompileDeclarationsIfNeeded()voidcompileDefinitionsIfNeeded()voidcompileDefinitionsIfNeeded(boolean bForce)voidcompileHeaderIfNeeded()voidcopyGenericState(boolean bCopyHierarchy)voidcopyHierarchyInfo()private java.util.Set<IType>createAllTypesInHierarchy()GosuClassParseInfocreateNewParseInfo()When changing the places from which this method is called run pc's gw.smoketest.pc.job.common.effectivetime.VisibleEffectiveTimeTest cause it will break!private GosuParsercreateParser(CompiledGosuClassSymbolTable symbolTable)java.lang.ObjectdontEverCallThis()booleanensureDefaultConstructor(ISymbolTable symbolTable, GosuParser parser)private booleanequalArgs(IParameterInfo[] parameters, java.util.List<ISymbol> args)private static voidfilterJavaDocAnnotations(java.util.List<IGosuAnnotation> annotations)ITypefindProxiedClassInHierarchy()private static DynamicFunctionSymbolfindVarPropertyAccessorDfs(java.lang.String signature, IGosuClassInternal implClass)voidforceTypeInfoInitialization()java.util.Set<IType>getAllTypesInHierarchy()Returns a Set of all IIntrinsicTypes that this class is assignable from, including this class.intgetAnonymousInnerClassCount()java.lang.ObjectgetArrayComponent(java.lang.Object array, int iIndex)Returns the value of the indexed component in the specified array object.intgetArrayLength(java.lang.Object array)Returns the length of the specified array object.ITypegetArrayType()Make an array type from this type.java.lang.Class<?>getBackingClass()IGosuClassgetBlock(int i)intgetBlockCount()java.util.List<IGosuClass>getBlocks()ICapturedSymbolgetCapturedSymbol(java.lang.String strName)java.util.Map<java.lang.String,ICapturedSymbol>getCapturedSymbols()ClassStatementgetClassStatement()ClassStatementgetClassStatementWithoutCompile()ClassTypegetClassType()CompilationStategetCompilationState()ITypegetComponentType()If this is an array type, a type representing the component type of the array.java.util.Set<IType>getCompoundTypeComponents()DynamicFunctionSymbolgetConstructorFunction(java.lang.String name)java.util.List<DynamicFunctionSymbol>getConstructorFunctions()IConstructorStatementgetConstructorStatement(IConstructorInfo ctor)DynamicFunctionSymbolgetDefaultConstructor()intgetDepth()java.lang.StringgetDisplayName()The display name of this intrinsic type.ITypegetEnclosingNonBlockType()ICompilableTypeInternalgetEnclosingType()Returns the type immediately enclosing this type.ITypegetEnclosingTypeReference()java.util.List<java.lang.String>getEnumConstants()IEnumValuegetEnumValue(java.lang.String strName)java.util.List<IEnumValue>getEnumValues()ISymbolgetExternalSymbol(java.lang.String strName)java.lang.StringgetFullDescription()IFunctionTypegetFunctionalInterface()IFunctionStatementgetFunctionStatement(IMethodInfo method)IGosuClassInternalgetGenericType()If this is a parameterized type, returns the generic type this type parameterizes.GenericTypeVariable[]getGenericTypeVariables()Returns an array of GenericTypeVariables declared with this Generic Type.java.util.List<? extends IGosuAnnotation>getGosuAnnotations()java.lang.StringgetId()private static DynamicFunctionSymbolgetImplDfs(IGosuClassInternal implClass, IFunctionType ifaceFuncType, boolean bAcceptAbstract)IGosuClassInternalgetInnerClass(java.lang.CharSequence relativeName)returns the appropriate inner classjava.util.List<IGosuClassInternal>getInnerClasses()java.util.Map<java.lang.CharSequence,IGosuClassInternal>getInnerClassesMap()IType[]getInterfaces()IJavaTypegetJavaType()java.util.Map<java.lang.CharSequence,? extends IGosuClass>getKnownInnerClassesWithoutCompiling()java.util.List<IType>getLoadedInnerClasses()IType[]getLoaderParameterizedTypes()VarStatementgetMemberField(java.lang.String charSequence)java.util.Map<java.lang.CharSequence,ISymbol>getMemberFieldIndexByName()java.util.List<IVarStatement>getMemberFields()java.util.Map<java.lang.String,VarStatement>getMemberFieldsMap()DynamicFunctionSymbolgetMemberFunction(IFunctionType funcType, boolean bContravariant)DynamicFunctionSymbolgetMemberFunction(IFunctionType funcType, java.lang.String signature, boolean bContravariant)java.util.List<DynamicFunctionSymbol>getMemberFunctions()java.util.List<DynamicFunctionSymbol>getMemberFunctions(java.lang.String names)java.util.List<DynamicPropertySymbol>getMemberProperties()DynamicPropertySymbolgetMemberProperty(java.lang.String name)ModifierInfogetModifierInfo()intgetModifiers()Returns the modifiers for this type, encoded in an integer.java.lang.StringgetName()The fully qualified name of this intrinsic type.java.lang.StringgetNamespace()The namespace for this class.protected GosuParsergetOrCreateParser(CompiledGosuClassSymbolTable symbolTable)protected ITypeRefgetOrCreateTypeReference()protected ITypeRefgetOrCreateTypeReference(IType type)private ITypegetOuterMostEnclosingClass(IType innerClass)IGosuClassInternalgetParameterizedType(IType... paramTypes)Assuming this intrinsic type is a Generic type, return the parameterized type associated with the given list of type parameters.java.util.Collection<IGosuClassInternal>getParameterizedTypes()GosuClassParseInfogetParseInfo()GosuParsergetParser()!! The parser is only set when this class is parsed in an editor in an IDE !!ParseResultsExceptiongetParseResultsException()INameInDeclarationgetPropertyDeclaration(java.lang.String name)private IGosuClassInternalgetPureGenericClass()java.lang.StringgetRelativeName()The relative or unqualified name.java.lang.StringgetSource()ISourceFileHandlegetSourceFileHandle()IFile[]getSourceFiles()VarStatementgetStaticField(java.lang.String name)java.util.List<IVarStatement>getStaticFields()java.util.List<DynamicFunctionSymbol>getStaticFunctions()java.util.List<DynamicPropertySymbol>getStaticProperties()DynamicPropertySymbolgetStaticProperty(java.lang.String name)SymbolgetStaticThisSymbol()java.util.List<? extends IType>getSubtypes()WARNING: This method is slow the first time it is called.IGosuClassInternalgetSuperClass()ITypegetSupertype()Returns the type representing the supertype of this type.GosuClassTypeInfogetTypeInfo()Get the type information for this intrinsic type.intgetTypeInfoChecksum()GosuClassTypeLoadergetTypeLoader()Returns the type loader responsible for loading this intrinsic type.IType[]getTypeParameters()If this is a parameterized type, returns the specific types used to create this type, null otherwies.ITypeUsesMapgetTypeUsesMap()private TypeVariableDefinitionImplgetTypeVarDefImpl(ITypeVariableDefinition typeVarDef)java.util.List<ITypeVariableDefinition>getTypeVarDefs()java.util.List<IFunctionType>getUnimplementedMethods()static java.util.List<IFunctionType>getUnimplementedMethods(IGosuClass gsIface, IGosuClass implClass, java.util.List<IFunctionType> unimpled, boolean ensurePublic, boolean bAcceptAbstract)java.util.List<IFunctionType>getUnimplementedMethods(java.util.List<IFunctionType> unimpled, IGosuClassInternal implClass, boolean bAcceptAbstract)private java.util.ListgetUnmodifiableValues(java.util.Map functionSymbolMap)private static booleanhandleParameterizedDfs(IGosuClass implClass, IMethodInfo mi, IFunctionType ifaceFuncType, boolean bAcceptAbstract)booleanhasAncestorBeenUpdated()booleanhasAssertions()booleanhasBackingClass()private booleanhasBeenUpdated(IGosuClassInternal type, int tiChecksum)booleanhasError()private booleanhasParseIssuesInUsesStatements()booleanhasWarnings()private booleanhaveAncestorsBeenUpdated(IGosuClassInternal type, int tiCheckSum)private voidinitLazyVars()booleanisAbstract()booleanisAccessible(IGosuClassInternal compilingClass, AbstractDynamicSymbol ads)private booleanisAccessible(IGosuClassInternal compilingClass, IVarStatement varStmt)booleanisAnnotation()booleanisAnonymous()booleanisArray()True if this is an array.private static booleanisAssignable(DynamicFunctionSymbol implDfs, IFunctionType ifaceFuncType)private booleanisAssignable(IFunctionType funcType, IDynamicFunctionSymbol dfs, boolean bContravariant)booleanisAssignableFrom(IType type)Determines if the type represented by this intrinsic type is either the same as, or is a super-type of the type represented by the specified type parameter.booleanisCannotCaptureSymbols()booleanisCompilable()booleanisCompiled()booleanisCompilingDeclarations()private booleanisCompilingDeclarationsFor(IScriptPartId scriptPart)booleanisCompilingDefinitions()booleanisCompilingHeader()booleanisCompoundType()booleanisCreateEditorParser()booleanisDeclarationsBypassed()booleanisDeclarationsCompiled()booleanisDefinitionsCompiled()booleanisDiscarded()True if this type has been replaced with a newer version of the same name in the type system.booleanisEnum()Returns true if this type is an enumeration.booleanisFinal()True if this type cannot be extended.booleanisGenericType()Returns true if this ia a Generic Type.booleanisHeaderCompiled()private booleanisHidden(DynamicFunctionSymbol dfs)private booleanisHidden(DynamicPropertySymbol dps)private booleanisHidden(IVarStatement varStmt)booleanisInnerDeclarationsCompiled()booleanisInterface()Returns true if this type is an interface.booleanisMutable()Are intances of this type mutable? Note sometimes it's difficult to determine.(package private) static booleanisObjectMethod(IMethodInfo mi)booleanisParameterizedType()Returns true if this ia a Parameterized Type.booleanisPrimitive()True if this type represents a primitive type e.g., Java int, char, etc.booleanisProxy()booleanisStale()booleanisStatic()booleanisStrictGenerics()booleanisStructure()booleanisSubClass(IType gsSubType)booleanisTestClass()private booleanisTypeRefreshedOutsideOfLock()booleanisValid()Defines this type if it is not yet fully defined.java.lang.ObjectmakeArrayInstance(int iLength)Construct an array instance of specified length.protected IGosuClassInternalmakeCopy(IType... paramTypes)private GosuParsermakeParserForPhase()private GosuParsermakeParserForPhase(boolean header)voidmarkStatic()private voidmaybeAssignInterfacesForParameterizedClass()private IGosuClassInternalmaybeLoadBlockToInterfaceProxy(java.lang.String relativeName)private voidpostAnalyze()voidputClassMembers(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic)voidputClassMembers(GosuClassTypeLoader loader, GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic)voidputClassMembers(GosuClassTypeLoader loader, GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic, boolean bStaticImport)private voidputConstructors(GosuParser owner, ISymbolTable table, boolean bSuperClass)private voidputEnhancements(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic, IModule module, IType type)private voidputFields(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass)private voidputFunctions(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass)private voidputProperties(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass)private voidputStaticFields(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass, boolean bStaticImport)private voidputStaticFunctions(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass, boolean bStaticImport)private voidputStaticProperties(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass, boolean bStaticImport)java.lang.ObjectreadResolve()IType requires this method be implemented to ensure IType instances can be centrally defined and cached.voidremoveBlock(IBlockClass block)voidremoveInnerClass(IGosuClassInternal innerGsClass)ITyperesolveRelativeInnerClass(java.lang.String strRelativeInnerClassName, boolean bForce)voidsetAnnotations(java.util.List<IGosuAnnotation> annotations)voidsetArrayComponent(java.lang.Object array, int iIndex, java.lang.Object value)Sets the value of the indexed component in the specified array object.voidsetCannotCaptureSymbols(boolean bCannotCaptureSymbols)voidsetCompilingDeclarations(boolean bCompilingDeclarations)voidsetCompilingDefinitions(boolean bCompilingDefinitions)voidsetCompilingHeader(boolean bCompilingHeader)voidsetCreateEditorParser(boolean bEditorParser)voidsetDeclarationsBypassed()voidsetDeclarationsCompiled()voidsetDefinitionsCompiled()voidsetDiscarded(boolean bDiscarded)voidsetEditorParser(GosuParser parser)!! Used only when compiling from an edtior !!voidsetEnclosingType(IType enclosingType)Only for use during type loading e.g., from GosuClassTypeLoadervoidsetEnum()voidsetFullDescription(java.lang.String description)voidsetGenericTypeVariables(java.util.List<ITypeVariableDefinition> typeVarExprList)voidsetHasAssertions(boolean bHasAssertions)voidsetHeaderCompiled()voidsetInnerDeclarationsCompiled()voidsetInterface(boolean bInterface)voidsetJavaType(IJavaType javaType)voidsetModifierInfo(ModifierInfo modifierInfo)voidsetNamespace(java.lang.String namespace)voidsetParseResultsException(ParseResultsException pe)voidsetStructure(boolean bStructure)voidsetSuperType(IType superType)voidsetTypeUsesMap(ITypeUsesMap usesMap)private booleanshouldCompileDeclarations()booleanshouldFullyCompileAnnotations()booleanshouldKeepDebugInfo()booleanshouldResolve()voidsyncGenericAndParameterizedClasses()java.lang.StringtoString()voidunloadBackingClass()voidunloadTypeInfo()Unload or nullify any references to this IType's ITypeInfo.private voidupdateParseResultsException()-
Methods inherited from class gw.lang.reflect.AbstractType
getLiteralMetaType, getMetaType, getTheRef
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.parser.IFileRepositoryBasedType
getJavaName
-
Methods inherited from interface gw.lang.reflect.IType
getLiteralMetaType, getMetaType, isDynamic
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
_strFullName
private java.lang.String _strFullName
-
_typeParams
private IType[] _typeParams
-
_parseInfo
protected transient GosuClassParseInfo _parseInfo
-
_strNamespace
private transient java.lang.String _strNamespace
-
_strRelativeName
private transient java.lang.String _strRelativeName
-
_typeLoader
private transient GosuClassTypeLoader _typeLoader
-
_bInterface
private transient boolean _bInterface
-
_bStructure
private transient boolean _bStructure
-
_bEnum
private transient boolean _bEnum
-
_mapInnerClasses
private transient java.util.Map<java.lang.CharSequence,IGosuClassInternal> _mapInnerClasses
-
_setTypes
private transient volatile java.util.Set<IType> _setTypes
-
_interfaces
private transient IType[] _interfaces
-
_superType
private transient IType _superType
-
_enclosingType
private transient IType _enclosingType
-
_proxiedJavaClassInGosuProxy
private transient IJavaType _proxiedJavaClassInGosuProxy
-
_javaClass
private transient volatile java.lang.ref.SoftReference<java.lang.Class<?>> _javaClass
-
_genericClass
private transient IGosuClassInternal _genericClass
-
_parameterizationByParamsName
private transient java.util.Map<java.lang.String,IGosuClassInternal> _parameterizationByParamsName
-
_functionalInterface
private LocklessLazyVar<IFunctionType> _functionalInterface
-
_typeInfo
private transient volatile GosuClassTypeInfo _typeInfo
-
_gsArrayClass
private transient IType _gsArrayClass
-
_bHasSessionVarStatements
private transient volatile java.lang.Boolean _bHasSessionVarStatements
-
_iMdChecksum
private transient int _iMdChecksum
-
_iTiChecksum
private transient int _iTiChecksum
-
_compilationState
private transient CompilationState _compilationState
-
_bEditorParser
private transient boolean _bEditorParser
-
_sourceFileHandle
private transient ISourceFileHandle _sourceFileHandle
-
_subtypes
private transient java.util.List<IGosuClassInternal> _subtypes
-
_description
private transient java.lang.String _description
-
_defaultConstructorName
private transient java.lang.String _defaultConstructorName
-
_bCannotCaptureSymbols
private transient boolean _bCannotCaptureSymbols
-
_hasError
private transient java.lang.Boolean _hasError
-
_bDiscarded
private transient boolean _bDiscarded
-
_bInitializing
private transient boolean _bInitializing
-
_blocks
private transient java.util.List<IGosuClass> _blocks
-
_valid
private transient LockingLazyVar<java.lang.Boolean> _valid
-
_typeRef
private transient ITypeRef _typeRef
-
_typeVarDefs
private transient java.util.List<ITypeVariableDefinition> _typeVarDefs
-
_genTypeVar
private transient GenericTypeVariable[] _genTypeVar
-
_parser
private transient GosuParser _parser
-
_typeUsesMap
private transient ITypeUsesMap _typeUsesMap
-
_bStrictGenerics
private transient java.lang.Boolean _bStrictGenerics
-
_modifierInfo
private transient ModifierInfo _modifierInfo
-
_bHasAssertions
private transient boolean _bHasAssertions
-
_bUsesQueryUsageSiteValidation
private transient boolean _bUsesQueryUsageSiteValidation
-
-
Constructor Detail
-
GosuClass
public GosuClass(java.lang.String strNamespace, java.lang.String strRelativeName, GosuClassTypeLoader classTypeLoader, ISourceFileHandle sourceFile, ITypeUsesMap typeUsesMap)
-
GosuClass
protected GosuClass(IGosuClass genericClass, IType[] typeParams)
-
GosuClass
protected GosuClass(IGosuClass genericClass, IType[] typeParams, boolean bCopyState)
-
-
Method Detail
-
getParseInfo
public GosuClassParseInfo getParseInfo()
- Specified by:
getParseInfoin interfaceICompilableTypeInternal- Specified by:
getParseInfoin interfaceIGosuClassInternal
-
hasAssertions
public boolean hasAssertions()
- Specified by:
hasAssertionsin interfaceICompilableTypeInternal
-
setHasAssertions
public void setHasAssertions(boolean bHasAssertions)
- Specified by:
setHasAssertionsin interfaceIGosuClassInternal
-
dontEverCallThis
public java.lang.Object dontEverCallThis()
- Specified by:
dontEverCallThisin interfaceIGosuClassInternal
-
copyGenericState
public void copyGenericState(boolean bCopyHierarchy)
- Specified by:
copyGenericStatein interfaceIGosuClassInternal
-
copyHierarchyInfo
public void copyHierarchyInfo()
- Specified by:
copyHierarchyInfoin interfaceIGosuClassInternal
-
assignParameterizedJavaTypeIfProxy
private void assignParameterizedJavaTypeIfProxy()
-
assignParameterizedSuperType
private void assignParameterizedSuperType()
-
assignParameterizedInterfaces
private void assignParameterizedInterfaces()
-
getName
public java.lang.String getName()
Description copied from interface:ITypeThe fully qualified name of this intrinsic type.
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:ITypeThe display name of this intrinsic type. Often this is simply the same asIType.getName(), but in some cases a type may want to modify it's name for presentation to the user.- Specified by:
getDisplayNamein interfaceIType
-
getRelativeName
public java.lang.String getRelativeName()
Description copied from interface:ITypeThe relative or unqualified name. For a class this should be just the class name without the package name.- Specified by:
getRelativeNamein interfaceIType
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:ITypeThe namespace for this class. For a java class this will be the package, while for other types of intrinsic types it could be another logical name.- Specified by:
getNamespacein interfaceIType
-
setNamespace
public void setNamespace(java.lang.String namespace)
- Specified by:
setNamespacein interfaceIGosuClass
-
getTypeLoader
public GosuClassTypeLoader getTypeLoader()
Description copied from interface:ITypeReturns the type loader responsible for loading this intrinsic type.- Specified by:
getTypeLoaderin interfaceICompilableType- Specified by:
getTypeLoaderin interfaceIGosuClassInternal- Specified by:
getTypeLoaderin interfaceIType
-
getSupertype
public IType getSupertype()
Description copied from interface:ITypeReturns the type representing the supertype of this type. Returns null if this type has no supertype.- Specified by:
getSupertypein interfaceIType
-
getGenericType
public IGosuClassInternal getGenericType()
Description copied from interface:ITypeIf this is a parameterized type, returns the generic type this type parameterizes. Otherwise, returns null.- Specified by:
getGenericTypein interfaceIType
-
isFinal
public boolean isFinal()
Description copied from interface:ITypeTrue if this type cannot be extended.
-
isInterface
public boolean isInterface()
Description copied from interface:ITypeReturns true if this type is an interface.- Specified by:
isInterfacein interfaceIType
-
setInterface
public void setInterface(boolean bInterface)
- Specified by:
setInterfacein interfaceIGosuClassInternal
-
isStructure
public boolean isStructure()
- Specified by:
isStructurein interfaceIGosuClass
-
setStructure
public void setStructure(boolean bStructure)
- Specified by:
setStructurein interfaceIGosuClassInternal
-
isEnum
public boolean isEnum()
Description copied from interface:ITypeReturns true if this type is an enumeration.
-
setEnum
public void setEnum()
- Specified by:
setEnumin interfaceIGosuClassInternal
-
getEnumConstants
public java.util.List<java.lang.String> getEnumConstants()
- Specified by:
getEnumConstantsin interfaceIEnumData
-
getEnumValues
public java.util.List<IEnumValue> getEnumValues()
- Specified by:
getEnumValuesin interfaceIEnumData
-
getEnumValue
public IEnumValue getEnumValue(java.lang.String strName)
- Specified by:
getEnumValuein interfaceIEnumData
-
getInterfaces
public IType[] getInterfaces()
- Specified by:
getInterfacesin interfaceIType- Returns:
- If this is a class, returns a list of all the interfaces this type implements. Similarly, if this is an interface, returns a list of all the interfaces this type extends. In any case, returns an empty list if this type neither implements nor extends interfaces.
-
maybeAssignInterfacesForParameterizedClass
private void maybeAssignInterfacesForParameterizedClass()
-
addInterface
public void addInterface(IType type)
- Specified by:
addInterfacein interfaceIGosuClassInternal
-
getJavaType
public IJavaType getJavaType()
- Specified by:
getJavaTypein interfaceIGosuClass
-
setJavaType
public void setJavaType(IJavaType javaType)
- Specified by:
setJavaTypein interfaceIGosuClassInternal
-
findProxiedClassInHierarchy
public IType findProxiedClassInHierarchy()
- Specified by:
findProxiedClassInHierarchyin interfaceIGosuClass
-
isParameterizedType
public boolean isParameterizedType()
Description copied from interface:ITypeReturns true if this ia a Parameterized Type. Note a Parameterzied Type is not the same as a Generic Type. The difference is that a Parameterized Type is a concrete version of a Generic Type. For instance, the class ArrayListis a Generic Type, while the class ArrayList is a Parameterized Type of the the Generic Type ArrayList . - Specified by:
isParameterizedTypein interfaceIType
-
isGenericType
public boolean isGenericType()
Description copied from interface:ITypeReturns true if this ia a Generic Type.- Specified by:
isGenericTypein interfaceIType- See Also:
IType.isParameterizedType()
-
getGenericTypeVariables
public GenericTypeVariable[] getGenericTypeVariables()
Description copied from interface:ITypeReturns an array of GenericTypeVariables declared with this Generic Type. Otherwise, returns null if this is not a Generic Type.- Specified by:
getGenericTypeVariablesin interfaceIType
-
getParameterizedType
public IGosuClassInternal getParameterizedType(IType... paramTypes)
Description copied from interface:ITypeAssuming this intrinsic type is a Generic type, return the parameterized type associated with the given list of type parameters. If the type has not been created yet, creates the parameterized type. Successive calls to this method having identical parameter types must return the identical parameterized type.- Specified by:
getParameterizedTypein interfaceIType- Parameters:
paramTypes- The type parameters.- Returns:
- The concrete type associated with the type parameters.
-
makeCopy
protected IGosuClassInternal makeCopy(IType... paramTypes)
-
getTypeParameters
public IType[] getTypeParameters()
Description copied from interface:ITypeIf this is a parameterized type, returns the specific types used to create this type, null otherwies.- Specified by:
getTypeParametersin interfaceIType
-
getAllTypesInHierarchy
public java.util.Set<IType> getAllTypesInHierarchy()
Description copied from interface:ITypeReturns a Set of all IIntrinsicTypes that this class is assignable from, including this class. This includes implemented interfaces and superclasses, recursively up the hieararchy. For array types, this will be a Set of all types that its component type is assignable from.- Specified by:
getAllTypesInHierarchyin interfaceIType
-
createAllTypesInHierarchy
private java.util.Set<IType> createAllTypesInHierarchy()
-
isArray
public boolean isArray()
Description copied from interface:ITypeTrue if this is an array.
-
isPrimitive
public boolean isPrimitive()
Description copied from interface:ITypeTrue if this type represents a primitive type e.g., Java int, char, etc.- Specified by:
isPrimitivein interfaceIType
-
getArrayType
public IType getArrayType()
Description copied from interface:ITypeMake an array type from this type. E.g., String -> String[]- Specified by:
getArrayTypein interfaceIType
-
makeArrayInstance
public java.lang.Object makeArrayInstance(int iLength)
Description copied from interface:ITypeConstruct an array instance of specified length.- Specified by:
makeArrayInstancein interfaceIType
-
getArrayComponent
public java.lang.Object getArrayComponent(java.lang.Object array, int iIndex) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsExceptionDescription copied from interface:ITypeReturns the value of the indexed component in the specified array object.- Specified by:
getArrayComponentin interfaceIType- Parameters:
array- An array instance of this intrinsic type.iIndex- The index of the component to get.- Returns:
- The value of the indexed component in the specified array.
- Throws:
java.lang.IllegalArgumentException- If the specified object is not an array.java.lang.ArrayIndexOutOfBoundsException- If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
-
setArrayComponent
public void setArrayComponent(java.lang.Object array, int iIndex, java.lang.Object value) throws java.lang.IllegalArgumentException, java.lang.ArrayIndexOutOfBoundsExceptionDescription copied from interface:ITypeSets the value of the indexed component in the specified array object.- Specified by:
setArrayComponentin interfaceIType- Parameters:
array- An array instance of this intrinsic type.iIndex- The index of the component to set.value- The new value of the indexed component.- Throws:
java.lang.IllegalArgumentException- If the specified object is not an array.java.lang.ArrayIndexOutOfBoundsException- If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
-
getArrayLength
public int getArrayLength(java.lang.Object array) throws java.lang.IllegalArgumentExceptionDescription copied from interface:ITypeReturns the length of the specified array object.- Specified by:
getArrayLengthin interfaceIType- Parameters:
array- An array instance of this intrinsic type.- Returns:
- The length of the array.
- Throws:
java.lang.IllegalArgumentException- If the object argument is not an array.
-
getComponentType
public IType getComponentType()
Description copied from interface:ITypeIf this is an array type, a type representing the component type of the array. Otherwise null.- Specified by:
getComponentTypein interfaceIType
-
isAssignableFrom
public boolean isAssignableFrom(IType type)
Description copied from interface:ITypeDetermines if the type represented by this intrinsic type is either the same as, or is a super-type of the type represented by the specified type parameter.- Specified by:
isAssignableFromin interfaceIType
-
isStrictGenerics
public boolean isStrictGenerics()
- Specified by:
isStrictGenericsin interfaceIParameterizableType
-
isMutable
public boolean isMutable()
Description copied from interface:ITypeAre intances of this type mutable? Note sometimes it's difficult to determine. For instance, java classes don't contain any information about mutability. In which case we always assume mutable, even when the underlying type may in fact be immutable. E.g., even though java.lang.String is not mutable, its corresponding JavaIntrinsicType will say it is.
-
isValid
public boolean isValid()
Description copied from interface:ITypeDefines this type if it is not yet fully defined. For instance, if this type has source code associated with it, it must fully compile the source for it to be fully defined.
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin interfaceICompilableType
-
getModifierInfo
public ModifierInfo getModifierInfo()
- Specified by:
getModifierInfoin interfaceIGosuClass
-
setModifierInfo
public void setModifierInfo(ModifierInfo modifierInfo)
- Specified by:
setModifierInfoin interfaceIGosuClassInternal
-
getModifiers
public int getModifiers()
Description copied from interface:ITypeReturns the modifiers for this type, encoded in an integer. The modifiers consist of the constants forpublic,protected,private,final,static,abstractthey should be decoded using the methods of classModifier.- Specified by:
getModifiersin interfaceIType- See Also:
Modifier
-
markStatic
public void markStatic()
- Specified by:
markStaticin interfaceIGosuClassInternal
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceIType
-
getTypeInfo
public GosuClassTypeInfo getTypeInfo()
Description copied from interface:ITypeGet the type information for this intrinsic type.- Specified by:
getTypeInfoin interfaceICompilableType- Specified by:
getTypeInfoin interfaceIGosuClass- Specified by:
getTypeInfoin interfaceIType- See Also:
ITypeInfo
-
hasAncestorBeenUpdated
public boolean hasAncestorBeenUpdated()
-
haveAncestorsBeenUpdated
private boolean haveAncestorsBeenUpdated(IGosuClassInternal type, int tiCheckSum)
-
hasBeenUpdated
private boolean hasBeenUpdated(IGosuClassInternal type, int tiChecksum)
-
unloadTypeInfo
public void unloadTypeInfo()
Description copied from interface:ITypeUnload or nullify any references to this IType's ITypeInfo.- Specified by:
unloadTypeInfoin interfaceIType
-
readResolve
public java.lang.Object readResolve() throws java.io.ObjectStreamExceptionDescription copied from interface:ITypeIType requires this method be implemented to ensure IType instances can be centrally defined and cached.- Specified by:
readResolvein interfaceIType- Throws:
java.io.ObjectStreamException
-
getId
public java.lang.String getId()
-
getSource
public java.lang.String getSource()
- Specified by:
getSourcein interfaceICompilableTypeInternal- Specified by:
getSourcein interfaceIGosuClass
-
isStale
public boolean isStale()
- Specified by:
isStalein interfaceIGosuClassInternal- Returns:
- True if this type is no longer current or has been unloaded.
-
getTypeInfoChecksum
public int getTypeInfoChecksum()
- Specified by:
getTypeInfoChecksumin interfaceIGosuClassInternal
-
isProxy
public boolean isProxy()
- Specified by:
isProxyin interfaceIGosuClassInternal
-
getFunctionalInterface
public IFunctionType getFunctionalInterface()
- Specified by:
getFunctionalInterfacein interfaceIType
-
getOrCreateTypeReference
protected ITypeRef getOrCreateTypeReference()
-
isSubClass
public boolean isSubClass(IType gsSubType)
- Specified by:
isSubClassin interfaceIGosuClass
-
isCompiled
public boolean isCompiled()
- Specified by:
isCompiledin interfaceIGosuClass
-
getConstructorFunctions
public java.util.List<DynamicFunctionSymbol> getConstructorFunctions()
- Specified by:
getConstructorFunctionsin interfaceIGosuClassInternal
-
getUnmodifiableValues
private java.util.List getUnmodifiableValues(java.util.Map functionSymbolMap)
-
getConstructorFunction
public DynamicFunctionSymbol getConstructorFunction(java.lang.String name)
- Specified by:
getConstructorFunctionin interfaceIGosuClassInternal
-
getDefaultConstructor
public DynamicFunctionSymbol getDefaultConstructor()
- Specified by:
getDefaultConstructorin interfaceIGosuClassInternal
-
getStaticFunctions
public java.util.List<DynamicFunctionSymbol> getStaticFunctions()
- Specified by:
getStaticFunctionsin interfaceIGosuClassInternal
-
getInnerClassesMap
public java.util.Map<java.lang.CharSequence,IGosuClassInternal> getInnerClassesMap()
- Specified by:
getInnerClassesMapin interfaceIGosuClass
-
getInnerClasses
public java.util.List<IGosuClassInternal> getInnerClasses()
- Specified by:
getInnerClassesin interfaceIGosuClass- Specified by:
getInnerClassesin interfaceIHasInnerClass
-
getKnownInnerClassesWithoutCompiling
public java.util.Map<java.lang.CharSequence,? extends IGosuClass> getKnownInnerClassesWithoutCompiling()
- Specified by:
getKnownInnerClassesWithoutCompilingin interfaceIGosuClass
-
getBlock
public IGosuClass getBlock(int i)
- Specified by:
getBlockin interfaceICompilableType
-
addInnerClass
public void addInnerClass(IGosuClassInternal innerGsClass)
- Specified by:
addInnerClassin interfaceIGosuClassInternal
-
removeInnerClass
public void removeInnerClass(IGosuClassInternal innerGsClass)
- Specified by:
removeInnerClassin interfaceIGosuClassInternal
-
resolveRelativeInnerClass
public IType resolveRelativeInnerClass(java.lang.String strRelativeInnerClassName, boolean bForce)
- Specified by:
resolveRelativeInnerClassin interfaceIHasInnerClass- Overrides:
resolveRelativeInnerClassin classInnerClassCapableType
-
getMemberFunctions
public java.util.List<DynamicFunctionSymbol> getMemberFunctions()
- Specified by:
getMemberFunctionsin interfaceIGosuClass
-
getMemberFunction
public DynamicFunctionSymbol getMemberFunction(IFunctionType funcType, java.lang.String signature, boolean bContravariant)
- Specified by:
getMemberFunctionin interfaceIGosuClassInternal
-
getMemberFunctions
public java.util.List<DynamicFunctionSymbol> getMemberFunctions(java.lang.String names)
- Specified by:
getMemberFunctionsin interfaceICompilableTypeInternal- Specified by:
getMemberFunctionsin interfaceIGosuClassInternal
-
getMemberFunction
public DynamicFunctionSymbol getMemberFunction(IFunctionType funcType, boolean bContravariant)
- Specified by:
getMemberFunctionin interfaceIGosuClassInternal
-
isAssignable
private boolean isAssignable(IFunctionType funcType, IDynamicFunctionSymbol dfs, boolean bContravariant)
-
getStaticProperty
public DynamicPropertySymbol getStaticProperty(java.lang.String name)
- Specified by:
getStaticPropertyin interfaceICompilableTypeInternal- Specified by:
getStaticPropertyin interfaceIGosuClassInternal
-
getStaticProperties
public java.util.List<DynamicPropertySymbol> getStaticProperties()
- Specified by:
getStaticPropertiesin interfaceIGosuClassInternal
-
getMemberProperties
public java.util.List<DynamicPropertySymbol> getMemberProperties()
- Specified by:
getMemberPropertiesin interfaceIGosuClassInternal
-
getMemberProperty
public DynamicPropertySymbol getMemberProperty(java.lang.String name)
- Specified by:
getMemberPropertyin interfaceICompilableTypeInternal- Specified by:
getMemberPropertyin interfaceIGosuClass- Specified by:
getMemberPropertyin interfaceIGosuClassInternal
-
getStaticFields
public java.util.List<IVarStatement> getStaticFields()
- Specified by:
getStaticFieldsin interfaceICompilableTypeInternal- Specified by:
getStaticFieldsin interfaceIGosuClassInternal
-
getStaticField
public VarStatement getStaticField(java.lang.String name)
- Specified by:
getStaticFieldin interfaceIGosuClassInternal
-
getMemberFieldIndexByName
public java.util.Map<java.lang.CharSequence,ISymbol> getMemberFieldIndexByName()
- Specified by:
getMemberFieldIndexByNamein interfaceIGosuClassInternal
-
getMemberFields
public java.util.List<IVarStatement> getMemberFields()
- Specified by:
getMemberFieldsin interfaceICompilableTypeInternal- Specified by:
getMemberFieldsin interfaceIGosuClass
-
getMemberFieldsMap
public java.util.Map<java.lang.String,VarStatement> getMemberFieldsMap()
- Specified by:
getMemberFieldsMapin interfaceIGosuClass
-
getStaticThisSymbol
public Symbol getStaticThisSymbol()
- Specified by:
getStaticThisSymbolin interfaceIGosuClassInternal
-
getCapturedSymbols
public java.util.Map<java.lang.String,ICapturedSymbol> getCapturedSymbols()
- Specified by:
getCapturedSymbolsin interfaceICompilableTypeInternal- Specified by:
getCapturedSymbolsin interfaceIGosuClassInternal
-
getCapturedSymbol
public ICapturedSymbol getCapturedSymbol(java.lang.String strName)
- Specified by:
getCapturedSymbolin interfaceICompilableTypeInternal- Specified by:
getCapturedSymbolin interfaceIGosuClassInternal
-
addCapturedSymbol
public void addCapturedSymbol(ICapturedSymbol sym)
- Specified by:
addCapturedSymbolin interfaceICompilableTypeInternal- Specified by:
addCapturedSymbolin interfaceIGosuClassInternal
-
ensureDefaultConstructor
public boolean ensureDefaultConstructor(ISymbolTable symbolTable, GosuParser parser)
- Specified by:
ensureDefaultConstructorin interfaceIGosuClassInternal
-
getClassStatement
public ClassStatement getClassStatement()
- Specified by:
getClassStatementin interfaceICompilableType- Returns:
- The ClassStatement (root ParsedElement) for this GosuClass
NOTE: Because GosuClass is lazily compiled, the ClassStatement returned is NOT guaranteed to be fully compiled by this method, and may return only the declarations of the class. If you wish to access the fully compiled ClassStatement you must call
compileDefinitionsIfNeeded().
-
getClassStatementWithoutCompile
public ClassStatement getClassStatementWithoutCompile()
- Specified by:
getClassStatementWithoutCompilein interfaceIGosuClass
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setSuperType
public void setSuperType(IType superType)
- Specified by:
setSuperTypein interfaceIGosuClassInternal
-
setEnclosingType
public void setEnclosingType(IType enclosingType)
Description copied from interface:IGosuClassOnly for use during type loading e.g., from GosuClassTypeLoader- Specified by:
setEnclosingTypein interfaceIGosuClass- Parameters:
enclosingType- the enclosing type
-
getEnclosingTypeReference
public IType getEnclosingTypeReference()
- Specified by:
getEnclosingTypeReferencein interfaceIGosuClass
-
isAnonymous
public boolean isAnonymous()
- Specified by:
isAnonymousin interfaceICompilableType
-
getDepth
public int getDepth()
- Specified by:
getDepthin interfaceICompilableTypeInternal- Specified by:
getDepthin interfaceIGosuClassInternal
-
compileDefinitionsIfNeeded
public void compileDefinitionsIfNeeded()
- Specified by:
compileDefinitionsIfNeededin interfaceIGosuClassInternal
-
compileDefinitionsIfNeeded
public void compileDefinitionsIfNeeded(boolean bForce)
- Specified by:
compileDefinitionsIfNeededin interfaceICompilableTypeInternal- Specified by:
compileDefinitionsIfNeededin interfaceIGosuClassInternal
-
isTypeRefreshedOutsideOfLock
private boolean isTypeRefreshedOutsideOfLock()
-
postAnalyze
private void postAnalyze()
-
hasParseIssuesInUsesStatements
private boolean hasParseIssuesInUsesStatements()
-
updateParseResultsException
private void updateParseResultsException()
-
compileDeclarationsIfNeeded
public void compileDeclarationsIfNeeded()
- Specified by:
compileDeclarationsIfNeededin interfaceICompilableTypeInternal- Specified by:
compileDeclarationsIfNeededin interfaceIGosuClassInternal
-
forceTypeInfoInitialization
public void forceTypeInfoInitialization()
- Specified by:
forceTypeInfoInitializationin interfaceIGosuClassInternal
-
syncGenericAndParameterizedClasses
public void syncGenericAndParameterizedClasses()
- Specified by:
syncGenericAndParameterizedClassesin interfaceIGosuClassInternal
-
getParameterizedTypes
public java.util.Collection<IGosuClassInternal> getParameterizedTypes()
- Specified by:
getParameterizedTypesin interfaceIGosuClassInternal
-
setAnnotations
public void setAnnotations(java.util.List<IGosuAnnotation> annotations)
- Specified by:
setAnnotationsin interfaceIGosuClassInternal
-
filterJavaDocAnnotations
private static void filterJavaDocAnnotations(java.util.List<IGosuAnnotation> annotations)
-
getEnclosingNonBlockType
public IType getEnclosingNonBlockType()
- Specified by:
getEnclosingNonBlockTypein interfaceICompilableTypeInternal- Specified by:
getEnclosingNonBlockTypein interfaceIGosuClassInternal
-
compileHeaderIfNeeded
public void compileHeaderIfNeeded()
- Specified by:
compileHeaderIfNeededin interfaceICompilableTypeInternal- Specified by:
compileHeaderIfNeededin interfaceIGosuClassInternal
-
shouldCompileDeclarations
private boolean shouldCompileDeclarations()
-
getCompilationState
public CompilationState getCompilationState()
- Specified by:
getCompilationStatein interfaceIGosuClass
-
isCompilingHeader
public boolean isCompilingHeader()
- Specified by:
isCompilingHeaderin interfaceIGosuClass
-
setCompilingHeader
public void setCompilingHeader(boolean bCompilingHeader)
- Specified by:
setCompilingHeaderin interfaceIGosuClassInternal
-
isHeaderCompiled
public boolean isHeaderCompiled()
- Specified by:
isHeaderCompiledin interfaceIGosuClass
-
setHeaderCompiled
public void setHeaderCompiled()
- Specified by:
setHeaderCompiledin interfaceIGosuClassInternal
-
isCompilingDeclarations
public boolean isCompilingDeclarations()
- Specified by:
isCompilingDeclarationsin interfaceIGosuClass
-
setCompilingDeclarations
public void setCompilingDeclarations(boolean bCompilingDeclarations)
- Specified by:
setCompilingDeclarationsin interfaceIGosuClassInternal
-
isDeclarationsCompiled
public boolean isDeclarationsCompiled()
- Specified by:
isDeclarationsCompiledin interfaceIGosuClass
-
isDeclarationsBypassed
public boolean isDeclarationsBypassed()
- Specified by:
isDeclarationsBypassedin interfaceIGosuClass
-
setDeclarationsBypassed
public void setDeclarationsBypassed()
- Specified by:
setDeclarationsBypassedin interfaceIGosuClassInternal
-
isInnerDeclarationsCompiled
public boolean isInnerDeclarationsCompiled()
- Specified by:
isInnerDeclarationsCompiledin interfaceIGosuClass
-
setDeclarationsCompiled
public void setDeclarationsCompiled()
- Specified by:
setDeclarationsCompiledin interfaceIGosuClassInternal
-
setInnerDeclarationsCompiled
public void setInnerDeclarationsCompiled()
- Specified by:
setInnerDeclarationsCompiledin interfaceIGosuClassInternal
-
isCompilingDefinitions
public boolean isCompilingDefinitions()
- Specified by:
isCompilingDefinitionsin interfaceIGosuClass
-
shouldFullyCompileAnnotations
public boolean shouldFullyCompileAnnotations()
- Specified by:
shouldFullyCompileAnnotationsin interfaceICompilableTypeInternal
-
setCompilingDefinitions
public void setCompilingDefinitions(boolean bCompilingDefinitions)
- Specified by:
setCompilingDefinitionsin interfaceIGosuClassInternal
-
isDefinitionsCompiled
public boolean isDefinitionsCompiled()
- Specified by:
isDefinitionsCompiledin interfaceIGosuClass
-
setDefinitionsCompiled
public void setDefinitionsCompiled()
- Specified by:
setDefinitionsCompiledin interfaceIGosuClassInternal
-
getSourceFileHandle
public ISourceFileHandle getSourceFileHandle()
- Specified by:
getSourceFileHandlein interfaceIFileRepositoryBasedType
-
getLoadedInnerClasses
public java.util.List<IType> getLoadedInnerClasses()
- Specified by:
getLoadedInnerClassesin interfaceIHasInnerClass
-
getClassType
public ClassType getClassType()
- Specified by:
getClassTypein interfaceIFileRepositoryBasedType
-
getGosuAnnotations
public java.util.List<? extends IGosuAnnotation> getGosuAnnotations()
- Specified by:
getGosuAnnotationsin interfaceICompilableTypeInternal- Specified by:
getGosuAnnotationsin interfaceIGosuClassInternal
-
createNewParseInfo
public GosuClassParseInfo createNewParseInfo()
When changing the places from which this method is called run pc's gw.smoketest.pc.job.common.effectivetime.VisibleEffectiveTimeTest cause it will break!- Specified by:
createNewParseInfoin interfaceIGosuClassInternal
-
isTestClass
public boolean isTestClass()
- Specified by:
isTestClassin interfaceIGosuClass
-
getInnerClass
public IGosuClassInternal getInnerClass(java.lang.CharSequence relativeName)
Description copied from interface:IHasInnerClassreturns the appropriate inner class- Specified by:
getInnerClassin interfaceIGosuClass- Specified by:
getInnerClassin interfaceIHasInnerClass- Returns:
-
maybeLoadBlockToInterfaceProxy
private IGosuClassInternal maybeLoadBlockToInterfaceProxy(java.lang.String relativeName)
-
getMemberField
public VarStatement getMemberField(java.lang.String charSequence)
- Specified by:
getMemberFieldin interfaceICompilableTypeInternal- Specified by:
getMemberFieldin interfaceIGosuClassInternal
-
shouldKeepDebugInfo
public boolean shouldKeepDebugInfo()
- Specified by:
shouldKeepDebugInfoin interfaceIGosuClass
-
getSuperClass
public IGosuClassInternal getSuperClass()
- Specified by:
getSuperClassin interfaceIGosuClassInternal
-
getEnclosingType
public ICompilableTypeInternal getEnclosingType()
Description copied from interface:ITypeReturns the type immediately enclosing this type. If this type is not enclosed, returns null.- Specified by:
getEnclosingTypein interfaceICompilableType- Specified by:
getEnclosingTypein interfaceICompilableTypeInternal- Specified by:
getEnclosingTypein interfaceIType
-
hasBackingClass
public boolean hasBackingClass()
- Specified by:
hasBackingClassin interfaceIGosuClass
-
unloadBackingClass
public void unloadBackingClass()
- Specified by:
unloadBackingClassin interfaceIGosuClass
-
getBackingClass
public java.lang.Class<?> getBackingClass()
- Specified by:
getBackingClassin interfaceIHasJavaClass
-
isCompilable
public boolean isCompilable()
- Specified by:
isCompilablein interfaceIType
-
getExternalSymbol
public ISymbol getExternalSymbol(java.lang.String strName)
- Specified by:
getExternalSymbolin interfaceICompilableType
-
putClassMembers
public void putClassMembers(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic)
- Specified by:
putClassMembersin interfaceICompilableTypeInternal- Specified by:
putClassMembersin interfaceIGosuClassInternal
-
putClassMembers
public void putClassMembers(GosuClassTypeLoader loader, GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic)
- Specified by:
putClassMembersin interfaceICompilableTypeInternal- Specified by:
putClassMembersin interfaceIGosuClassInternal
-
putClassMembers
public void putClassMembers(GosuClassTypeLoader loader, GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic, boolean bStaticImport)
- Specified by:
putClassMembersin interfaceIGosuClassInternal
-
addJavaEnhancements
private void addJavaEnhancements(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic, IJavaType type)
-
putEnhancements
private void putEnhancements(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic, IModule module, IType type)
-
putFunctions
private void putFunctions(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass)
-
isHidden
private boolean isHidden(DynamicFunctionSymbol dfs)
-
isHidden
private boolean isHidden(DynamicPropertySymbol dps)
-
isHidden
private boolean isHidden(IVarStatement varStmt)
-
isCompilingDeclarationsFor
private boolean isCompilingDeclarationsFor(IScriptPartId scriptPart)
-
putProperties
private void putProperties(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass)
-
putConstructors
private void putConstructors(GosuParser owner, ISymbolTable table, boolean bSuperClass)
-
putStaticFunctions
private void putStaticFunctions(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass, boolean bStaticImport)
-
putStaticProperties
private void putStaticProperties(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass, boolean bStaticImport)
-
putStaticFields
private void putStaticFields(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass, boolean bStaticImport)
-
areSymbolsFromSameDeclaration
private boolean areSymbolsFromSameDeclaration(IVarStatement varStmt, ISymbol existingSymbol)
-
putFields
private void putFields(ISymbolTable table, IGosuClassInternal gsContextClass, boolean bSuperClass)
-
isAccessible
public boolean isAccessible(IGosuClassInternal compilingClass, AbstractDynamicSymbol ads)
- Specified by:
isAccessiblein interfaceIGosuClassInternal
-
isAccessible
private boolean isAccessible(IGosuClassInternal compilingClass, IVarStatement varStmt)
-
setParseResultsException
public void setParseResultsException(ParseResultsException pe)
- Specified by:
setParseResultsExceptionin interfaceIGosuClassInternal
-
hasError
public boolean hasError()
- Specified by:
hasErrorin interfaceIGosuClass
-
hasWarnings
public boolean hasWarnings()
- Specified by:
hasWarningsin interfaceIGosuClass
-
getPureGenericClass
private IGosuClassInternal getPureGenericClass()
-
getParseResultsException
public ParseResultsException getParseResultsException()
- Specified by:
getParseResultsExceptionin interfaceIGosuClass
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareToin interfacejava.lang.Comparable
-
shouldResolve
public boolean shouldResolve()
- Specified by:
shouldResolvein interfaceIGosuClassInternal
-
makeParserForPhase
private GosuParser makeParserForPhase()
-
makeParserForPhase
private GosuParser makeParserForPhase(boolean header)
-
getTypeUsesMap
public ITypeUsesMap getTypeUsesMap()
- Specified by:
getTypeUsesMapin interfaceICompilableType
-
setTypeUsesMap
public void setTypeUsesMap(ITypeUsesMap usesMap)
- Specified by:
setTypeUsesMapin interfaceIGosuClassInternal
-
assignTypeUsesMap
public void assignTypeUsesMap(GosuParser parser)
- Specified by:
assignTypeUsesMapin interfaceICompilableTypeInternal- Specified by:
assignTypeUsesMapin interfaceIGosuClassInternal
-
setEditorParser
public void setEditorParser(GosuParser parser)
!! Used only when compiling from an edtior !!- Specified by:
setEditorParserin interfaceIGosuClassInternal
-
setCreateEditorParser
public void setCreateEditorParser(boolean bEditorParser)
- Specified by:
setCreateEditorParserin interfaceIGosuClass
-
isCreateEditorParser
public boolean isCreateEditorParser()
- Specified by:
isCreateEditorParserin interfaceICompilableTypeInternal- Specified by:
isCreateEditorParserin interfaceIGosuClassInternal
-
getAnonymousInnerClassCount
public int getAnonymousInnerClassCount()
- Specified by:
getAnonymousInnerClassCountin interfaceICompilableTypeInternal
-
getParser
public GosuParser getParser()
!! The parser is only set when this class is parsed in an editor in an IDE !!- Specified by:
getParserin interfaceICompilableType
-
getOrCreateParser
protected GosuParser getOrCreateParser(CompiledGosuClassSymbolTable symbolTable)
-
createParser
private GosuParser createParser(CompiledGosuClassSymbolTable symbolTable)
-
addDelegateImpls
public void addDelegateImpls(ISymbolTable symTable, GosuClassParser parser)
- Specified by:
addDelegateImplsin interfaceIGosuClassInternal
-
getUnimplementedMethods
public java.util.List<IFunctionType> getUnimplementedMethods()
- Specified by:
getUnimplementedMethodsin interfaceIGosuClassInternal
-
getUnimplementedMethods
public java.util.List<IFunctionType> getUnimplementedMethods(java.util.List<IFunctionType> unimpled, IGosuClassInternal implClass, boolean bAcceptAbstract)
- Specified by:
getUnimplementedMethodsin interfaceIGosuClassInternal
-
getUnimplementedMethods
public static java.util.List<IFunctionType> getUnimplementedMethods(IGosuClass gsIface, IGosuClass implClass, java.util.List<IFunctionType> unimpled, boolean ensurePublic, boolean bAcceptAbstract)
-
handleParameterizedDfs
private static boolean handleParameterizedDfs(IGosuClass implClass, IMethodInfo mi, IFunctionType ifaceFuncType, boolean bAcceptAbstract)
-
isAssignable
private static boolean isAssignable(DynamicFunctionSymbol implDfs, IFunctionType ifaceFuncType)
-
isObjectMethod
static boolean isObjectMethod(IMethodInfo mi)
-
getImplDfs
private static DynamicFunctionSymbol getImplDfs(IGosuClassInternal implClass, IFunctionType ifaceFuncType, boolean bAcceptAbstract)
-
findVarPropertyAccessorDfs
private static DynamicFunctionSymbol findVarPropertyAccessorDfs(java.lang.String signature, IGosuClassInternal implClass)
-
setFullDescription
public void setFullDescription(java.lang.String description)
- Specified by:
setFullDescriptionin interfaceIGosuClassInternal
-
getFullDescription
public java.lang.String getFullDescription()
- Specified by:
getFullDescriptionin interfaceIGosuClassInternal
-
getSubtypes
public java.util.List<? extends IType> getSubtypes()
Description copied from interface:IGosuClassWARNING: This method is slow the first time it is called. It will iterate over all types in the system and find all matching subtypes- Specified by:
getSubtypesin interfaceIGosuClass- Returns:
- all subtypes of this type
-
isDiscarded
public boolean isDiscarded()
Description copied from interface:ITypeTrue if this type has been replaced with a newer version of the same name in the type system.- Specified by:
isDiscardedin interfaceIType
-
setDiscarded
public void setDiscarded(boolean bDiscarded)
- Specified by:
setDiscardedin interfaceIType
-
isCompoundType
public boolean isCompoundType()
- Specified by:
isCompoundTypein interfaceIType
-
getCompoundTypeComponents
public java.util.Set<IType> getCompoundTypeComponents()
- Specified by:
getCompoundTypeComponentsin interfaceIType
-
isCannotCaptureSymbols
public boolean isCannotCaptureSymbols()
- Specified by:
isCannotCaptureSymbolsin interfaceIGosuClassInternal
-
setCannotCaptureSymbols
public void setCannotCaptureSymbols(boolean bCannotCaptureSymbols)
- Specified by:
setCannotCaptureSymbolsin interfaceIGosuClassInternal
-
getBlocks
public java.util.List<IGosuClass> getBlocks()
- Specified by:
getBlocksin interfaceIGosuClass- Specified by:
getBlocksin interfaceIGosuClassInternal
-
getBlockCount
public int getBlockCount()
- Specified by:
getBlockCountin interfaceICompilableTypeInternal- Specified by:
getBlockCountin interfaceIGosuClassInternal
-
addBlock
public void addBlock(IBlockClass block)
- Specified by:
addBlockin interfaceICompilableTypeInternal- Specified by:
addBlockin interfaceIGosuClassInternal
-
removeBlock
public void removeBlock(IBlockClass block)
- Specified by:
removeBlockin interfaceICompilableTypeInternal- Specified by:
removeBlockin interfaceIGosuClassInternal
-
initLazyVars
private void initLazyVars()
-
assignTypeVarsFromTypeParams
public void assignTypeVarsFromTypeParams(IType[] typeParams)
Note a gosu class can be BOTH parameterzied AND generic. For example, class Bar{ function blah() : T {...} } class Foo extends Bar {} The class Bar here is parameterized by the type var from Foo, yet it is still a generic class. The blah() method in Foo's typeinfo must have a return type consistent with Foo's type var upper bound, CharSequence. //## todo: maybe we don't need this concept any longer? i.e., parameterization should work correctly regardless.
-
getTypeVarDefs
public java.util.List<ITypeVariableDefinition> getTypeVarDefs()
-
setGenericTypeVariables
public void setGenericTypeVariables(java.util.List<ITypeVariableDefinition> typeVarExprList)
- Specified by:
setGenericTypeVariablesin interfaceIGosuClassInternal
-
getTypeVarDefImpl
private TypeVariableDefinitionImpl getTypeVarDefImpl(ITypeVariableDefinition typeVarDef)
-
getFunctionStatement
public IFunctionStatement getFunctionStatement(IMethodInfo method)
- Specified by:
getFunctionStatementin interfaceIGosuClass
-
getPropertyDeclaration
public INameInDeclaration getPropertyDeclaration(java.lang.String name)
- Specified by:
getPropertyDeclarationin interfaceIGosuClass
-
getConstructorStatement
public IConstructorStatement getConstructorStatement(IConstructorInfo ctor)
- Specified by:
getConstructorStatementin interfaceIGosuClass
-
equalArgs
private boolean equalArgs(IParameterInfo[] parameters, java.util.List<ISymbol> args)
-
getLoaderParameterizedTypes
public IType[] getLoaderParameterizedTypes()
- Specified by:
getLoaderParameterizedTypesin interfaceIParameterizableType
-
getSourceFiles
public IFile[] getSourceFiles()
- Specified by:
getSourceFilesin interfaceIType
-
isAnnotation
public boolean isAnnotation()
- Specified by:
isAnnotationin interfaceICanBeAnnotation
-
-