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 Boolean
private Boolean
private Boolean
private Class<?>
private IAnnotationInfo[]
private IJavaClassInfo[]
private IJavaClassConstructor[]
private IJavaClassField[]
private IJavaClassMethod[]
private LocklessLazyVar<IType>
private IJavaClassField[]
private ISourceFileHandle
private IJavaClassType[]
private IJavaClassInfo[]
private IType
private IJavaMethodDescriptor[]
private Integer
private String
private IJavaPropertyDescriptor[]
private IJavaClassInfo
private IJavaClassTypeVariable[]
Fields inherited from class gw.internal.gosu.parser.TypeJavaClassType
_module
Fields inherited from interface gw.lang.reflect.java.IJavaClassInfo
LOCK
Fields inherited from interface gw.lang.reflect.java.IJavaClassType
EMPTY_ARRAY, ERROR_TYPE, NULL_TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Two 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 int
getConstructor
(IJavaClassInfo... paramTypes) Returns all annotations that are directly present on this element.getDeclaredMethod
(String methodName, IJavaClassInfo... paramTypes) Object[]
getMethod
(String methodName, IJavaClassInfo... paramTypes) int
getName()
boolean
int
hashCode()
In order to maintain consistency withIJavaClassInfo.equals(Object)
, the hash code of a non-array IJavaClassInfo must be computed as follows:boolean
boolean
isAnnotationPresent
(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.boolean
isArray()
boolean
isAssignableFrom
(IJavaClassInfo aClass) boolean
isEnum()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isPublic()
boolean
boolean
isVisibleViaFeatureDescriptor
(IScriptabilityModifier constraint) resolveImport
(String relativeName) resolveType
(String relativeName, int ignoreFlags) resolveType
(String relativeName, IJavaClassInfo whosAskin, int ignoreFlags) void
setJavaType
(IType javaType) void
setSourceFileHandle
(ISourceFileHandle fileHandle) toString()
Methods inherited from class gw.internal.gosu.parser.TypeJavaClassType
createType, createType, getActualType, getActualType
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getLocationInfo
Methods inherited from interface gw.lang.reflect.java.IJavaClassInfo
compile, getDeclaredField, getDeepestClassAtOffset, getField, isCompilable
Methods 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:
isAnnotation
in interfaceIJavaClassInfo
-
isInterface
public boolean isInterface()- Specified by:
isInterface
in interfaceIJavaClassInfo
-
getConcreteType
- Specified by:
getConcreteType
in interfaceIJavaClassType
-
getName
- Specified by:
getName
in interfaceIJavaClassType
- Overrides:
getName
in classTypeJavaClassType
-
getNameSignature
- Specified by:
getNameSignature
in interfaceIJavaClassInfo
-
getMethod
public IJavaClassMethod getMethod(String methodName, IJavaClassInfo... paramTypes) throws NoSuchMethodException - Specified by:
getMethod
in interfaceIJavaClassInfo
- Throws:
NoSuchMethodException
-
getDeclaredMethod
public IJavaClassMethod getDeclaredMethod(String methodName, IJavaClassInfo... paramTypes) throws NoSuchMethodException - Specified by:
getDeclaredMethod
in interfaceIJavaClassInfo
- Throws:
NoSuchMethodException
-
getDeclaredMethods
- Specified by:
getDeclaredMethods
in interfaceIJavaClassInfo
-
newInstance
- Specified by:
newInstance
in interfaceIJavaClassInfo
- Throws:
InstantiationException
IllegalAccessException
-
getEnumConstants
- Specified by:
getEnumConstants
in interfaceIJavaClassInfo
-
getJavaType
- Specified by:
getJavaType
in interfaceIJavaClassInfo
-
setJavaType
-
getInterfaces
- Specified by:
getInterfaces
in interfaceIJavaClassInfo
-
getSuperclass
- Specified by:
getSuperclass
in interfaceIJavaClassInfo
-
getTypeParameters
- Specified by:
getTypeParameters
in interfaceIJavaClassInfo
-
getDeclaredFields
- Specified by:
getDeclaredFields
in interfaceIJavaClassInfo
-
getDeclaredConstructors
- Specified by:
getDeclaredConstructors
in interfaceIJavaClassInfo
-
getConstructor
public IJavaClassConstructor getConstructor(IJavaClassInfo... paramTypes) throws NoSuchMethodException - Specified by:
getConstructor
in interfaceIJavaClassInfo
- Throws:
NoSuchMethodException
-
isAnnotationPresent
Description copied from interface:IJavaAnnotatedElement
Returns 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:
isAnnotationPresent
in 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:IJavaAnnotatedElement
Returns this element's annotation for the specified type if such an annotation is present, else null.- Specified by:
getAnnotation
in 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:IJavaAnnotatedElement
Returns 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:
getDeclaredAnnotations
in interfaceIJavaAnnotatedElement
- Returns:
- All annotations directly present on this element
-
createClassDocNode
- Specified by:
createClassDocNode
in interfaceIJavaClassInfo
-
getPropertyDescriptors
- Specified by:
getPropertyDescriptors
in interfaceIJavaClassInfo
-
getMethodDescriptors
- Specified by:
getMethodDescriptors
in interfaceIJavaClassInfo
-
hasCustomBeanInfo
public boolean hasCustomBeanInfo()- Specified by:
hasCustomBeanInfo
in interfaceIJavaClassInfo
-
getRelativeName
- Specified by:
getRelativeName
in interfaceIJavaClassInfo
-
getDisplayName
- Specified by:
getDisplayName
in interfaceIJavaClassInfo
-
getSimpleName
- Specified by:
getSimpleName
in interfaceIJavaClassType
-
isVisibleViaFeatureDescriptor
- Specified by:
isVisibleViaFeatureDescriptor
in interfaceIJavaClassInfo
-
isHiddenViaFeatureDescriptor
public boolean isHiddenViaFeatureDescriptor()- Specified by:
isHiddenViaFeatureDescriptor
in interfaceIJavaClassInfo
-
getFields
- Specified by:
getFields
in interfaceIJavaClassInfo
-
getJavaClass
- Specified by:
getJavaClass
in interfaceIClassJavaClassInfo
-
getComponentType
- Specified by:
getComponentType
in interfaceIJavaClassInfo
- Specified by:
getComponentType
in interfaceIJavaClassType
- Overrides:
getComponentType
in classTypeJavaClassType
-
isArray
public boolean isArray()- Specified by:
isArray
in interfaceIJavaClassInfo
- Specified by:
isArray
in interfaceIJavaClassType
- Overrides:
isArray
in classTypeJavaClassType
-
isEnum
public boolean isEnum()- Specified by:
isEnum
in interfaceIJavaClassInfo
-
getModifiers
public int getModifiers()- Specified by:
getModifiers
in interfaceIJavaClassInfo
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitive
in interfaceIJavaClassInfo
-
getEnclosingClass
- Specified by:
getEnclosingClass
in interfaceIJavaAnnotatedElement
-
getEnclosingType
- Specified by:
getEnclosingType
in interfaceIJavaClassInfo
-
getNamespace
- Specified by:
getNamespace
in interfaceIJavaClassType
- Overrides:
getNamespace
in classTypeJavaClassType
-
getGenericInterfaces
- Specified by:
getGenericInterfaces
in interfaceIJavaClassInfo
-
getGenericSuperclass
- Specified by:
getGenericSuperclass
in interfaceIJavaClassInfo
-
getArrayType
- Specified by:
getArrayType
in interfaceIJavaClassInfo
-
getDeclaredClasses
- Specified by:
getDeclaredClasses
in interfaceIJavaClassInfo
-
isAssignableFrom
- Specified by:
isAssignableFrom
in interfaceIJavaClassInfo
-
isPublic
public boolean isPublic()- Specified by:
isPublic
in interfaceIJavaClassInfo
-
getCachedModifiers
private int getCachedModifiers() -
isProtected
public boolean isProtected()- Specified by:
isProtected
in interfaceIJavaClassInfo
-
isInternal
public boolean isInternal()- Specified by:
isInternal
in interfaceIJavaClassInfo
-
isPrivate
public boolean isPrivate()- Specified by:
isPrivate
in interfaceIJavaClassInfo
-
equals
Description copied from interface:IJavaClassInfo
Two 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:
equals
in interfaceIJavaClassInfo
- Overrides:
equals
in classTypeJavaClassType
- Parameters:
obj
- the other object- Returns:
- whether the two objects represent the same class.
-
hashCode
public int hashCode()Description copied from interface:IJavaClassInfo
In 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:
hashCode
in interfaceIJavaClassInfo
- Overrides:
hashCode
in classTypeJavaClassType
- Returns:
- the hash code
-
toString
-
getBackingClass
- Specified by:
getBackingClass
in interfaceIJavaClassInfo
-
getSourceFileHandle
- Specified by:
getSourceFileHandle
in interfaceIJavaClassInfo
-
getModule
- Specified by:
getModule
in interfaceIJavaClassType
- Specified by:
getModule
in interfaceITypeInfoResolver
- Overrides:
getModule
in classTypeJavaClassType
-
isTypeGosuClassInstance
public boolean isTypeGosuClassInstance()- Specified by:
isTypeGosuClassInstance
in interfaceIClassJavaClassInfo
-
resolveType
- Specified by:
resolveType
in interfaceITypeInfoResolver
-
resolveType
- Specified by:
resolveType
in interfaceITypeInfoResolver
-
resolveImport
- Specified by:
resolveImport
in interfaceITypeInfoResolver
-
setSourceFileHandle
-