Package gw.internal.gosu.parser
Class ClassJavaClassInfo
java.lang.Object
gw.internal.gosu.parser.TypeJavaClassType
gw.internal.gosu.parser.ClassJavaClassInfo
- All Implemented Interfaces:
IClassJavaClassInfo,IJavaAnnotatedElement,IJavaClassInfo,IJavaClassType,ITypeInfoResolver,Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface gw.lang.reflect.java.IJavaClassInfo
IJavaClassInfo.Util -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Booleanprivate Booleanprivate Booleanprivate Class<?>private IAnnotationInfo[]private IJavaClassInfo[]private IJavaClassConstructor[]private IJavaClassField[]private IJavaClassMethod[]private LocklessLazyVar<IType>private IJavaClassField[]private ISourceFileHandleprivate IJavaClassType[]private IJavaClassInfo[]private ITypeprivate IJavaMethodDescriptor[]private Integerprivate Stringprivate IJavaPropertyDescriptor[]private IJavaClassInfoprivate IJavaClassTypeVariable[]Fields inherited from class gw.internal.gosu.parser.TypeJavaClassType
_moduleFields inherited from interface gw.lang.reflect.java.IJavaClassInfo
LOCKFields inherited from interface gw.lang.reflect.java.IJavaClassType
EMPTY_ARRAY, ERROR_TYPE, NULL_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo IJavaClassInfo instances are equal if they are both non-arrays and have the same name and module.getAnnotation(Class annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.private intgetConstructor(IJavaClassInfo... paramTypes) Returns all annotations that are directly present on this element.getDeclaredMethod(String methodName, IJavaClassInfo... paramTypes) Object[]getMethod(String methodName, IJavaClassInfo... paramTypes) intgetName()booleaninthashCode()In order to maintain consistency withIJavaClassInfo.equals(Object), the hash code of a non-array IJavaClassInfo must be computed as follows:booleanbooleanisAnnotationPresent(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.booleanisArray()booleanisAssignableFrom(IJavaClassInfo aClass) booleanisEnum()booleanbooleanbooleanbooleanbooleanbooleanbooleanisPublic()booleanbooleanisVisibleViaFeatureDescriptor(IScriptabilityModifier constraint) resolveImport(String relativeName) resolveType(String relativeName, int ignoreFlags) resolveType(String relativeName, IJavaClassInfo whosAskin, int ignoreFlags) voidsetJavaType(IType javaType) voidsetSourceFileHandle(ISourceFileHandle fileHandle) toString()Methods inherited from class gw.internal.gosu.parser.TypeJavaClassType
createType, createType, getActualType, getActualTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getLocationInfoMethods inherited from interface gw.lang.reflect.java.IJavaClassInfo
compile, getDeclaredField, getDeepestClassAtOffset, getField, isCompilableMethods inherited from interface gw.lang.reflect.java.IJavaClassType
getActualType, getActualType, isAssignableFrom
-
Field Details
-
_class
-
_declaredMethods
-
_interfaces
-
_superclass
-
_typeVariables
-
_declaredFields
-
_declaredConstructors
-
_declaredAnnotations
-
_propertyDescriptors
-
_methodDescriptors
-
_fields
-
_genericInterfaces
-
_declaredClasses
-
_fileHandle
-
_javaType
-
_namespace
-
_modifiers
-
_bArray
-
_bEnum
-
_bInterface
-
_enclosingClass
-
-
Constructor Details
-
ClassJavaClassInfo
-
-
Method Details
-
isAnnotation
public boolean isAnnotation()- Specified by:
isAnnotationin interfaceIJavaClassInfo
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein interfaceIJavaClassInfo
-
getConcreteType
- Specified by:
getConcreteTypein interfaceIJavaClassType
-
getName
- Specified by:
getNamein interfaceIJavaClassType- Overrides:
getNamein classTypeJavaClassType
-
getNameSignature
- Specified by:
getNameSignaturein interfaceIJavaClassInfo
-
getMethod
public IJavaClassMethod getMethod(String methodName, IJavaClassInfo... paramTypes) throws NoSuchMethodException - Specified by:
getMethodin interfaceIJavaClassInfo- Throws:
NoSuchMethodException
-
getDeclaredMethod
public IJavaClassMethod getDeclaredMethod(String methodName, IJavaClassInfo... paramTypes) throws NoSuchMethodException - Specified by:
getDeclaredMethodin interfaceIJavaClassInfo- Throws:
NoSuchMethodException
-
getDeclaredMethods
- Specified by:
getDeclaredMethodsin interfaceIJavaClassInfo
-
newInstance
- Specified by:
newInstancein interfaceIJavaClassInfo- Throws:
InstantiationExceptionIllegalAccessException
-
getEnumConstants
- Specified by:
getEnumConstantsin interfaceIJavaClassInfo
-
getJavaType
- Specified by:
getJavaTypein interfaceIJavaClassInfo
-
setJavaType
-
getInterfaces
- Specified by:
getInterfacesin interfaceIJavaClassInfo
-
getSuperclass
- Specified by:
getSuperclassin interfaceIJavaClassInfo
-
getTypeParameters
- Specified by:
getTypeParametersin interfaceIJavaClassInfo
-
getDeclaredFields
- Specified by:
getDeclaredFieldsin interfaceIJavaClassInfo
-
getDeclaredConstructors
- Specified by:
getDeclaredConstructorsin interfaceIJavaClassInfo
-
getConstructor
public IJavaClassConstructor getConstructor(IJavaClassInfo... paramTypes) throws NoSuchMethodException - Specified by:
getConstructorin interfaceIJavaClassInfo- Throws:
NoSuchMethodException
-
isAnnotationPresent
Description copied from interface:IJavaAnnotatedElementReturns true if an annotation for the specified type is present on this element, else false. This method is designed primarily for convenient access to marker annotations.- Specified by:
isAnnotationPresentin interfaceIJavaAnnotatedElement- Parameters:
annotationClass- the Class object corresponding to the annotation type- Returns:
- true if an annotation for the specified annotation type is present on this element, else false
-
getAnnotation
Description copied from interface:IJavaAnnotatedElementReturns this element's annotation for the specified type if such an annotation is present, else null.- Specified by:
getAnnotationin interfaceIJavaAnnotatedElement- Parameters:
annotationClass- the Class object corresponding to the annotation type- Returns:
- this element's annotation for the specified annotation type if present on this element, else null
-
getDeclaredAnnotations
Description copied from interface:IJavaAnnotatedElementReturns all annotations that are directly present on this element. Unlike the other methods in this interface, this method ignores inherited annotations. (Returns an array of length zero if no annotations are directly present on this element.) The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers.- Specified by:
getDeclaredAnnotationsin interfaceIJavaAnnotatedElement- Returns:
- All annotations directly present on this element
-
createClassDocNode
- Specified by:
createClassDocNodein interfaceIJavaClassInfo
-
getPropertyDescriptors
- Specified by:
getPropertyDescriptorsin interfaceIJavaClassInfo
-
getMethodDescriptors
- Specified by:
getMethodDescriptorsin interfaceIJavaClassInfo
-
hasCustomBeanInfo
public boolean hasCustomBeanInfo()- Specified by:
hasCustomBeanInfoin interfaceIJavaClassInfo
-
getRelativeName
- Specified by:
getRelativeNamein interfaceIJavaClassInfo
-
getDisplayName
- Specified by:
getDisplayNamein interfaceIJavaClassInfo
-
getSimpleName
- Specified by:
getSimpleNamein interfaceIJavaClassType
-
isVisibleViaFeatureDescriptor
- Specified by:
isVisibleViaFeatureDescriptorin interfaceIJavaClassInfo
-
isHiddenViaFeatureDescriptor
public boolean isHiddenViaFeatureDescriptor()- Specified by:
isHiddenViaFeatureDescriptorin interfaceIJavaClassInfo
-
getFields
- Specified by:
getFieldsin interfaceIJavaClassInfo
-
getJavaClass
- Specified by:
getJavaClassin interfaceIClassJavaClassInfo
-
getComponentType
- Specified by:
getComponentTypein interfaceIJavaClassInfo- Specified by:
getComponentTypein interfaceIJavaClassType- Overrides:
getComponentTypein classTypeJavaClassType
-
isArray
public boolean isArray()- Specified by:
isArrayin interfaceIJavaClassInfo- Specified by:
isArrayin interfaceIJavaClassType- Overrides:
isArrayin classTypeJavaClassType
-
isEnum
public boolean isEnum()- Specified by:
isEnumin interfaceIJavaClassInfo
-
getModifiers
public int getModifiers()- Specified by:
getModifiersin interfaceIJavaClassInfo
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceIJavaClassInfo
-
getEnclosingClass
- Specified by:
getEnclosingClassin interfaceIJavaAnnotatedElement
-
getEnclosingType
- Specified by:
getEnclosingTypein interfaceIJavaClassInfo
-
getNamespace
- Specified by:
getNamespacein interfaceIJavaClassType- Overrides:
getNamespacein classTypeJavaClassType
-
getGenericInterfaces
- Specified by:
getGenericInterfacesin interfaceIJavaClassInfo
-
getGenericSuperclass
- Specified by:
getGenericSuperclassin interfaceIJavaClassInfo
-
getArrayType
- Specified by:
getArrayTypein interfaceIJavaClassInfo
-
getDeclaredClasses
- Specified by:
getDeclaredClassesin interfaceIJavaClassInfo
-
isAssignableFrom
- Specified by:
isAssignableFromin interfaceIJavaClassInfo
-
isPublic
public boolean isPublic()- Specified by:
isPublicin interfaceIJavaClassInfo
-
getCachedModifiers
private int getCachedModifiers() -
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceIJavaClassInfo
-
isInternal
public boolean isInternal()- Specified by:
isInternalin interfaceIJavaClassInfo
-
isPrivate
public boolean isPrivate()- Specified by:
isPrivatein interfaceIJavaClassInfo
-
equals
Description copied from interface:IJavaClassInfoTwo IJavaClassInfo instances are equal if they are both non-arrays and have the same name and module. If the two instances are arrays, then they are equal if their component types are equal.- Specified by:
equalsin interfaceIJavaClassInfo- Overrides:
equalsin classTypeJavaClassType- Parameters:
obj- the other object- Returns:
- whether the two objects represent the same class.
-
hashCode
public int hashCode()Description copied from interface:IJavaClassInfoIn order to maintain consistency withIJavaClassInfo.equals(Object), the hash code of a non-array IJavaClassInfo must be computed as follows:getName().hashCode() * 31 + getModule().hashCode()For arrays, the hashCode is equal to the hashCode of the component type.- Specified by:
hashCodein interfaceIJavaClassInfo- Overrides:
hashCodein classTypeJavaClassType- Returns:
- the hash code
-
toString
-
getBackingClass
- Specified by:
getBackingClassin interfaceIJavaClassInfo
-
getSourceFileHandle
- Specified by:
getSourceFileHandlein interfaceIJavaClassInfo
-
getModule
- Specified by:
getModulein interfaceIJavaClassType- Specified by:
getModulein interfaceITypeInfoResolver- Overrides:
getModulein classTypeJavaClassType
-
isTypeGosuClassInstance
public boolean isTypeGosuClassInstance()- Specified by:
isTypeGosuClassInstancein interfaceIClassJavaClassInfo
-
resolveType
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveType
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveImport
- Specified by:
resolveImportin interfaceITypeInfoResolver
-
setSourceFileHandle
-