Class GosuFragment
java.lang.Object
gw.lang.reflect.AbstractType
gw.internal.gosu.parser.fragments.GosuFragment
- All Implemented Interfaces:
ICompilableTypeInternal
,IFileRepositoryBasedType
,IHasInnerClass
,ICompilableType
,IGosuFragment
,IHasJavaClass
,IType
,IJavaBackedTypeData
,Serializable
Deprecated.
DO NOT USE THIS CLASS! This is here exclusively for PCF types.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.private LockingLazyVar<IType>
Deprecated.private List<IGosuClass>
Deprecated.private boolean
Deprecated.private IExpression
Deprecated.Deprecated.private LockingLazyVar<IJavaClassInfo>
Deprecated.private String
Deprecated.private LockingLazyVar<FragmentInstance>
Deprecated.private IType
Deprecated.private GosuFragmentTypeInfo
Deprecated.private ITypeUsesMap
Deprecated.private static final IType[]
Deprecated.private static final IGenericTypeVariable[]
Deprecated.static final String
Deprecated.Fields inherited from interface gw.lang.reflect.gs.IGosuFragment
FRAGMENT_PACKAGE
Fields inherited from interface gw.lang.reflect.IType
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST
-
Constructor Summary
ConstructorsConstructorDescriptionGosuFragment
(String name, HashMap<String, ISymbol> externalSymbols, ITypeUsesMap typeUsesMap) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlock
(IBlockClass block) Deprecated.void
Deprecated.void
assignTypeUsesMap
(GosuParser parser) Deprecated.byte[]
compile()
Deprecated.void
Deprecated.void
compileDefinitionsIfNeeded
(boolean bForce) Deprecated.void
Deprecated.private FragmentInstance
Deprecated.protected GosuFragmentTypeInfo
Deprecated.private IJavaClassInfo
Deprecated.evaluate
(IExternalSymbolMap externalSymbols) Deprecated.evaluateRoot
(IExternalSymbolMap externalSymbols) Deprecated.Deprecated.Returns a Set of all IIntrinsicTypes that this class is assignable from, including this class.int
Deprecated.getArrayComponent
(Object array, int iIndex) Deprecated.Returns the value of the indexed component in the specified array object.int
getArrayLength
(Object array) Deprecated.Returns the length of the specified array object.Deprecated.Make an array type from this type.Deprecated.Deprecated.getBlock
(int i) Deprecated.int
Deprecated.getCapturedSymbol
(String strName) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.If this is an array type, a type representing the component type of the array.Deprecated.int
getDepth()
Deprecated.Deprecated.The display name of this intrinsic type.Deprecated.Deprecated.Returns the type immediately enclosing this type.Deprecated.getExternalSymbol
(String strName) Deprecated.Deprecated.If this is a parameterized type, returns the generic type this type parameterizes.Deprecated.Returns an array of GenericTypeVariables declared with this Generic Type.List<? extends IGosuAnnotation>
Deprecated.getInnerClass
(CharSequence strTypeName) Deprecated.returns the appropriate inner classDeprecated.IType[]
Deprecated.Deprecated.getMemberField
(String charSequence) Deprecated.List<? extends IVarStatement>
Deprecated.getMemberFunctions
(String names) Deprecated.getMemberProperty
(String name) Deprecated.int
Deprecated.Returns the modifiers for this type, encoded in an integer.getName()
Deprecated.The fully qualified name of this intrinsic type.Deprecated.The namespace for this class.getParameterizedType
(IType... ofType) Deprecated.Assuming this intrinsic type is a Generic type, return the parameterized type associated with the given list of type parameters.Deprecated.Deprecated.Deprecated.The relative or unqualified name.Deprecated.Deprecated.Deprecated.getStaticProperty
(String name) Deprecated.Deprecated.Returns the type representing the supertype of this type.Deprecated.Get the type information for this intrinsic type.Deprecated.Returns the type loader responsible for loading this intrinsic type.IType[]
Deprecated.If this is a parameterized type, returns the specific types used to create this type, null otherwies.Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
isArray()
Deprecated.True if this is an array.boolean
isAssignableFrom
(IType type) Deprecated.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.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.True if this type has been replaced with a newer version of the same name in the type system.boolean
isEnum()
Deprecated.Returns true if this type is an enumeration.boolean
isExternalSymbol
(String name) Deprecated.boolean
isFinal()
Deprecated.True if this type cannot be extended.boolean
Deprecated.Returns true if this ia a Generic Type.boolean
Deprecated.Returns true if this type is an interface.boolean
Deprecated.Are intances of this type mutable? Note sometimes it's difficult to determine.boolean
Deprecated.Returns true if this ia a Parameterized Type.boolean
Deprecated.True if this type represents a primitive type e.g., Java int, char, etc.boolean
isStatic()
Deprecated.boolean
isValid()
Deprecated.Defines this type if it is not yet fully defined.makeArrayInstance
(int iLength) Deprecated.Construct an array instance of specified length.void
putClassMembers
(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic) Deprecated.void
putClassMembers
(GosuClassTypeLoader loader, GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic) Deprecated.Deprecated.IType requires this method be implemented to ensure IType instances can be centrally defined and cached.void
removeBlock
(IBlockClass block) Deprecated.resolveRelativeInnerClass
(String strRelativeInnerClassName, boolean bForce) Deprecated.void
setArrayComponent
(Object array, int iIndex, Object value) Deprecated.Sets the value of the indexed component in the specified array object.void
setDiscarded
(boolean bDiscarded) Deprecated.void
setExpression
(IExpression expression) Deprecated.boolean
Deprecated.toString()
Deprecated.void
Deprecated.Unload or nullify any references to this IType's ITypeInfo.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
getFunctionalInterface, getLiteralMetaType, getMetaType, getSourceFiles, isDynamic
-
Field Details
-
FRAGMENT_NAME_PREFIX
Deprecated.- See Also:
-
EMTPY_TYPE_VARIABLE_ARRAY
Deprecated. -
EMTPY_TYPE_ARRAY
Deprecated. -
_blocks
Deprecated. -
_typeInfo
Deprecated. -
_discarded
private boolean _discardedDeprecated. -
_typeUsesMap
Deprecated. -
_arrayType
Deprecated. -
_expression
Deprecated. -
_name
Deprecated. -
_externalSymbols
Deprecated. -
_supertype
Deprecated. -
_allTypesInHierarchy
Deprecated. -
_javaClass
Deprecated.
-
-
Constructor Details
-
GosuFragment
Deprecated.
-
-
Method Details
-
getBlockCount
public int getBlockCount()Deprecated.- Specified by:
getBlockCount
in interfaceICompilableTypeInternal
-
addBlock
Deprecated.- Specified by:
addBlock
in interfaceICompilableTypeInternal
-
removeBlock
Deprecated.- Specified by:
removeBlock
in interfaceICompilableTypeInternal
-
getBlock
Deprecated.- Specified by:
getBlock
in interfaceICompilableType
-
getTypeInfo
Deprecated.Description copied from interface:IType
Get the type information for this intrinsic type.- Specified by:
getTypeInfo
in interfaceICompilableType
- Specified by:
getTypeInfo
in interfaceIType
- See Also:
-
isFinal
public boolean isFinal()Deprecated.Description copied from interface:IType
True if this type cannot be extended. -
getTypeLoader
Deprecated.Description copied from interface:IType
Returns the type loader responsible for loading this intrinsic type.- Specified by:
getTypeLoader
in interfaceICompilableType
- Specified by:
getTypeLoader
in interfaceIType
-
getTypeUsesMap
Deprecated.- Specified by:
getTypeUsesMap
in interfaceICompilableType
-
assignTypeUsesMap
Deprecated.- Specified by:
assignTypeUsesMap
in interfaceICompilableTypeInternal
-
isValid
public boolean isValid()Deprecated.Description copied from interface:IType
Defines 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. -
getArrayType
Deprecated.Description copied from interface:IType
Make an array type from this type. E.g., String -> String[]- Specified by:
getArrayType
in interfaceIType
-
getSourceFileHandle
Deprecated.- Specified by:
getSourceFileHandle
in interfaceIFileRepositoryBasedType
-
getClassStatement
Deprecated.- Specified by:
getClassStatement
in interfaceICompilableType
-
getMemberFunctions
Deprecated.- Specified by:
getMemberFunctions
in interfaceICompilableTypeInternal
-
resolveRelativeInnerClass
Deprecated.- Specified by:
resolveRelativeInnerClass
in interfaceIHasInnerClass
-
getEnclosingType
Deprecated.Description copied from interface:IType
Returns the type immediately enclosing this type. If this type is not enclosed, returns null.- Specified by:
getEnclosingType
in interfaceICompilableType
- Specified by:
getEnclosingType
in interfaceICompilableTypeInternal
- Specified by:
getEnclosingType
in interfaceIType
-
getEnclosingNonBlockType
Deprecated.- Specified by:
getEnclosingNonBlockType
in interfaceICompilableTypeInternal
-
getStaticProperty
Deprecated.- Specified by:
getStaticProperty
in interfaceICompilableTypeInternal
-
getMemberProperty
Deprecated.- Specified by:
getMemberProperty
in interfaceICompilableTypeInternal
-
getCapturedSymbols
Deprecated.- Specified by:
getCapturedSymbols
in interfaceICompilableTypeInternal
-
getCapturedSymbol
Deprecated.- Specified by:
getCapturedSymbol
in interfaceICompilableTypeInternal
-
getMemberField
Deprecated.- Specified by:
getMemberField
in interfaceICompilableTypeInternal
-
isStatic
public boolean isStatic()Deprecated.- Specified by:
isStatic
in interfaceICompilableType
-
isAnonymous
public boolean isAnonymous()Deprecated.- Specified by:
isAnonymous
in interfaceICompilableType
-
getGenericType
Deprecated.Description copied from interface:IType
If this is a parameterized type, returns the generic type this type parameterizes. Otherwise, returns null.- Specified by:
getGenericType
in interfaceIType
-
isInterface
public boolean isInterface()Deprecated.Description copied from interface:IType
Returns true if this type is an interface.- Specified by:
isInterface
in interfaceIType
-
isEnum
public boolean isEnum()Deprecated.Description copied from interface:IType
Returns true if this type is an enumeration. -
getInterfaces
Deprecated.- Specified by:
getInterfaces
in 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.
-
isParameterizedType
public boolean isParameterizedType()Deprecated.Description copied from interface:IType
Returns 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:
isParameterizedType
in interfaceIType
-
isGenericType
public boolean isGenericType()Deprecated.Description copied from interface:IType
Returns true if this ia a Generic Type.- Specified by:
isGenericType
in interfaceIType
- See Also:
-
getParser
Deprecated.- Specified by:
getParser
in interfaceICompilableType
-
addCapturedSymbol
Deprecated.- Specified by:
addCapturedSymbol
in interfaceICompilableTypeInternal
-
getGenericTypeVariables
Deprecated.Description copied from interface:IType
Returns an array of GenericTypeVariables declared with this Generic Type. Otherwise, returns null if this is not a Generic Type.- Specified by:
getGenericTypeVariables
in interfaceIType
-
getParameterizedType
Deprecated.Description copied from interface:IType
Assuming 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:
getParameterizedType
in interfaceIType
- Parameters:
ofType
- The type parameters.- Returns:
- The concrete type associated with the type parameters.
-
getTypeParameters
Deprecated.Description copied from interface:IType
If this is a parameterized type, returns the specific types used to create this type, null otherwies.- Specified by:
getTypeParameters
in interfaceIType
-
isArray
public boolean isArray()Deprecated.Description copied from interface:IType
True if this is an array. -
isPrimitive
public boolean isPrimitive()Deprecated.Description copied from interface:IType
True if this type represents a primitive type e.g., Java int, char, etc.- Specified by:
isPrimitive
in interfaceIType
-
makeArrayInstance
Deprecated.Description copied from interface:IType
Construct an array instance of specified length.- Specified by:
makeArrayInstance
in interfaceIType
-
getArrayComponent
public Object getArrayComponent(Object array, int iIndex) throws IllegalArgumentException, ArrayIndexOutOfBoundsException Deprecated.Description copied from interface:IType
Returns the value of the indexed component in the specified array object.- Specified by:
getArrayComponent
in 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:
IllegalArgumentException
- If the specified object is not an array.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(Object array, int iIndex, Object value) throws IllegalArgumentException, ArrayIndexOutOfBoundsException Deprecated.Description copied from interface:IType
Sets the value of the indexed component in the specified array object.- Specified by:
setArrayComponent
in 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:
IllegalArgumentException
- If the specified object is not an array.ArrayIndexOutOfBoundsException
- If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
-
getArrayLength
Deprecated.Description copied from interface:IType
Returns the length of the specified array object.- Specified by:
getArrayLength
in interfaceIType
- Parameters:
array
- An array instance of this intrinsic type.- Returns:
- The length of the array.
- Throws:
IllegalArgumentException
- If the object argument is not an array.
-
getComponentType
Deprecated.Description copied from interface:IType
If this is an array type, a type representing the component type of the array. Otherwise null.- Specified by:
getComponentType
in interfaceIType
-
isAssignableFrom
Deprecated.Description copied from interface:IType
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.- Specified by:
isAssignableFrom
in interfaceIType
-
isMutable
public boolean isMutable()Deprecated.Description copied from interface:IType
Are 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. -
unloadTypeInfo
public void unloadTypeInfo()Deprecated.Description copied from interface:IType
Unload or nullify any references to this IType's ITypeInfo.- Specified by:
unloadTypeInfo
in interfaceIType
-
readResolve
Deprecated.Description copied from interface:IType
IType requires this method be implemented to ensure IType instances can be centrally defined and cached.- Specified by:
readResolve
in interfaceIType
- Throws:
ObjectStreamException
-
getModifiers
public int getModifiers()Deprecated.Description copied from interface:IType
Returns the modifiers for this type, encoded in an integer. The modifiers consist of the constants forpublic
,protected
,private
,final
,static
,abstract
they should be decoded using the methods of classModifier
.- Specified by:
getModifiers
in interfaceIType
- See Also:
-
isAbstract
public boolean isAbstract()Deprecated.- Specified by:
isAbstract
in interfaceIType
-
isDiscarded
public boolean isDiscarded()Deprecated.Description copied from interface:IType
True if this type has been replaced with a newer version of the same name in the type system.- Specified by:
isDiscarded
in interfaceIType
-
setDiscarded
public void setDiscarded(boolean bDiscarded) Deprecated.- Specified by:
setDiscarded
in interfaceIType
-
isCompoundType
public boolean isCompoundType()Deprecated.- Specified by:
isCompoundType
in interfaceIType
-
getCompoundTypeComponents
Deprecated.- Specified by:
getCompoundTypeComponents
in interfaceIType
-
getInnerClass
Deprecated.Description copied from interface:IHasInnerClass
returns the appropriate inner class- Specified by:
getInnerClass
in interfaceIHasInnerClass
- Returns:
-
getDepth
public int getDepth()Deprecated.- Specified by:
getDepth
in interfaceICompilableTypeInternal
-
compileDeclarationsIfNeeded
public void compileDeclarationsIfNeeded()Deprecated.- Specified by:
compileDeclarationsIfNeeded
in interfaceICompilableTypeInternal
-
compileDefinitionsIfNeeded
public void compileDefinitionsIfNeeded(boolean bForce) Deprecated.- Specified by:
compileDefinitionsIfNeeded
in interfaceICompilableTypeInternal
-
compileHeaderIfNeeded
public void compileHeaderIfNeeded()Deprecated.- Specified by:
compileHeaderIfNeeded
in interfaceICompilableTypeInternal
-
putClassMembers
public void putClassMembers(GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic) Deprecated.- Specified by:
putClassMembers
in interfaceICompilableTypeInternal
-
putClassMembers
public void putClassMembers(GosuClassTypeLoader loader, GosuParser owner, ISymbolTable table, IGosuClassInternal gsContextClass, boolean bStatic) Deprecated.- Specified by:
putClassMembers
in interfaceICompilableTypeInternal
-
isCreateEditorParser
public boolean isCreateEditorParser()Deprecated.- Specified by:
isCreateEditorParser
in interfaceICompilableTypeInternal
-
getAnonymousInnerClassCount
public int getAnonymousInnerClassCount()Deprecated.- Specified by:
getAnonymousInnerClassCount
in interfaceICompilableTypeInternal
-
getGosuAnnotations
Deprecated.- Specified by:
getGosuAnnotations
in interfaceICompilableTypeInternal
-
shouldFullyCompileAnnotations
public boolean shouldFullyCompileAnnotations()Deprecated.- Specified by:
shouldFullyCompileAnnotations
in interfaceICompilableTypeInternal
-
getMemberFields
Deprecated.- Specified by:
getMemberFields
in interfaceICompilableTypeInternal
-
getStaticFields
Deprecated.- Specified by:
getStaticFields
in interfaceICompilableTypeInternal
-
setExpression
Deprecated.- Specified by:
setExpression
in interfaceIGosuFragment
-
createTypeInfo
Deprecated. -
getExpression
Deprecated.- Specified by:
getExpression
in interfaceIGosuFragment
-
isExternalSymbol
Deprecated.- Specified by:
isExternalSymbol
in interfaceIGosuFragment
-
evaluate
Deprecated.- Specified by:
evaluate
in interfaceIGosuFragment
-
evaluateRoot
Deprecated.- Specified by:
evaluateRoot
in interfaceIGosuFragment
-
getBackingClass
Deprecated.- Specified by:
getBackingClass
in interfaceIHasJavaClass
-
getBackingClassInfo
Deprecated.- Specified by:
getBackingClassInfo
in interfaceIJavaBackedTypeData
-
getRelativeName
Deprecated.Description copied from interface:IType
The relative or unqualified name. For a class this should be just the class name without the package name.- Specified by:
getRelativeName
in interfaceIType
-
getName
Deprecated.Description copied from interface:IType
The fully qualified name of this intrinsic type. -
getNamespace
Deprecated.Description copied from interface:IType
The 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:
getNamespace
in interfaceIType
-
getDisplayName
Deprecated.Description copied from interface:IType
The 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:
getDisplayName
in interfaceIType
-
getSupertype
Deprecated.Description copied from interface:IType
Returns the type representing the supertype of this type. Returns null if this type has no supertype.- Specified by:
getSupertype
in interfaceIType
-
getAllTypesInHierarchy
Deprecated.Description copied from interface:IType
Returns 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:
getAllTypesInHierarchy
in interfaceIType
-
getExternalSymbol
Deprecated.- Specified by:
getExternalSymbol
in interfaceICompilableType
-
createNewInstance
Deprecated. -
defineClass
Deprecated. -
getSource
Deprecated.- Specified by:
getSource
in interfaceICompilableTypeInternal
-
getParseInfo
Deprecated.- Specified by:
getParseInfo
in interfaceICompilableTypeInternal
-
hasAssertions
public boolean hasAssertions()Deprecated.- Specified by:
hasAssertions
in interfaceICompilableTypeInternal
-
getClassType
Deprecated.- Specified by:
getClassType
in interfaceIFileRepositoryBasedType
-
getInnerClasses
Deprecated.- Specified by:
getInnerClasses
in interfaceIHasInnerClass
-
getLoadedInnerClasses
Deprecated.- Specified by:
getLoadedInnerClasses
in interfaceIHasInnerClass
-
toString
Deprecated. -
isCompilable
public boolean isCompilable()Deprecated.- Specified by:
isCompilable
in interfaceIType
-
compile
public byte[] compile()Deprecated.
-