Package gw.internal.gosu.parser
Class GosuArrayClass
java.lang.Object
gw.lang.reflect.AbstractType
gw.lang.reflect.DefaultArrayType
gw.internal.gosu.parser.GosuArrayClass
- All Implemented Interfaces:
IGosuArrayClass
,IDefaultArrayType
,IEnhanceableType
,IHasJavaClass
,IType
,Serializable
- See Also:
-
Field Summary
FieldsFields inherited from class gw.lang.reflect.DefaultArrayType
INTERFACES
Fields inherited from interface gw.lang.reflect.IType
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetArrayComponent
(Object array, int iIndex) Returns the value of the indexed component in the specified array object.int
getArrayLength
(Object array) Returns the length of the specified array object.private int[]
getGosuClassDepthPair
(IType component, int depth) boolean
hasGosuClassAtRoot
(IType component) makeArrayInstance
(int iLength) Construct an array instance of specified length.protected IGosuArrayClass
Allows subclasses to return a more specific interfacesvoid
setArrayComponent
(Object array, int iIndex, Object value) Sets the value of the indexed component in the specified array object.Methods inherited from class gw.lang.reflect.DefaultArrayType
getAllTypesInHierarchy, getArrayType, getBackingClass, getComponentType, getCompoundTypeComponents, getDisplayName, getEnclosingType, getGenericType, getGenericTypeVariables, getInterfaces, getModifiers, getName, getNamespace, getParameterizedType, getRelativeName, getSupertype, getThisRef, getTypeInfo, getTypeLoader, getTypeParameters, isAbstract, isArray, isAssignableFrom, isCompoundType, isDiscarded, isEnum, isFinal, isGenericType, isInterface, isMutable, isParameterizedType, isPrimitive, isValid, readResolve, setDiscarded, toString, unloadTypeInfo
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.reflect.IType
compile, getAllTypesInHierarchy, getArrayType, getComponentType, getCompoundTypeComponents, getDisplayName, getEnclosingType, getFunctionalInterface, getGenericType, getGenericTypeVariables, getInterfaces, getLiteralMetaType, getMetaType, getModifiers, getName, getNamespace, getParameterizedType, getRelativeName, getSourceFiles, getSupertype, getTypeInfo, getTypeLoader, getTypeParameters, isAbstract, isArray, isAssignableFrom, isCompilable, isCompoundType, isDiscarded, isDynamic, isEnum, isFinal, isGenericType, isInterface, isMutable, isParameterizedType, isPrimitive, isValid, readResolve, setDiscarded, unloadTypeInfo
-
Field Details
-
_lazyConcreteClass
-
-
Constructor Details
-
GosuArrayClass
-
-
Method Details
-
makeArrayType
Description copied from class:DefaultArrayType
Allows subclasses to return a more specific interfaces- Overrides:
makeArrayType
in classDefaultArrayType
-
makeArrayInstance
Description copied from interface:IType
Construct an array instance of specified length.- Specified by:
makeArrayInstance
in interfaceIType
- Overrides:
makeArrayInstance
in classDefaultArrayType
-
getDims
-
getArrayComponent
public Object getArrayComponent(Object array, int iIndex) throws IllegalArgumentException, ArrayIndexOutOfBoundsException Description copied from interface:IType
Returns the value of the indexed component in the specified array object.- Specified by:
getArrayComponent
in interfaceIType
- Overrides:
getArrayComponent
in classDefaultArrayType
- 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 Description copied from interface:IType
Sets the value of the indexed component in the specified array object.- Specified by:
setArrayComponent
in interfaceIType
- Overrides:
setArrayComponent
in classDefaultArrayType
- 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
Description copied from interface:IType
Returns the length of the specified array object.- Specified by:
getArrayLength
in interfaceIType
- Overrides:
getArrayLength
in classDefaultArrayType
- 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.
-
hasGosuClassAtRoot
-
getConcreteClass
- Specified by:
getConcreteClass
in interfaceIDefaultArrayType
- Overrides:
getConcreteClass
in classDefaultArrayType
-
getGosuClassDepthPair
-