Package gw.internal.gosu.parser
Class AsmClassJavaClassInfo
java.lang.Object
gw.lang.reflect.java.JavaSourceElement
gw.internal.gosu.parser.AsmTypeJavaClassType
gw.internal.gosu.parser.AsmClassJavaClassInfo
- All Implemented Interfaces:
IAsmJavaClassInfo,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 IJavaClassField[]private AsmClassprivate IAnnotationInfo[]private IJavaClassInfo[]private IJavaClassConstructor[]private IJavaClassField[]private IJavaClassMethod[]private LocklessLazyVar<IType>private IEnumValue[]private IJavaClassType[]private IJavaClassInfo[]private ITypeprivate IJavaMethodDescriptor[]private Stringprivate IJavaPropertyDescriptor[]private Stringprivate ISourceFileHandleprivate IJavaClassInfoprivate IJavaClassInfoprivate IJavaClassTypeVariable[]Fields inherited from class gw.internal.gosu.parser.AsmTypeJavaClassType
_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.private JavaSourceElementprivate ISourceFileHandlegetAnnotation(Class annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.com.sun.source.tree.CompilationUnitTreegetConstructor(IJavaClassInfo... paramTypes) Returns all annotations that are directly present on this element.getDeclaredMethod(String methodName, IJavaClassInfo... paramTypes) getDeepestClassAtOffset(int offset) intObject[]getMethod(String methodName, IJavaClassInfo... paramTypes) intgetName()com.sun.source.util.SourcePositionsintcom.sun.source.tree.TreegetTree()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()booleanisVisibleViaFeatureDescriptor(IScriptabilityModifier constraint) private StringresolveImport(String relativeName) resolveType(String relativeName, int ignoreFlags) resolveType(String relativeName, IJavaClassInfo whosAskin, int ignoreFlags) voidsetJavaType(IJavaType javaType) toString()Methods inherited from class gw.internal.gosu.parser.AsmTypeJavaClassType
createType, createType, getActualType, getActualType, getTypeMethods inherited from class gw.lang.reflect.java.JavaSourceElement
findInnerSourceType, getLocationInfoMethods 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, 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
-
_allFields
-
_genericInterfaces
-
_declaredClasses
-
_enclosingClass
-
_enumConstants
-
_simpleName
-
_namespace
-
_javaType
-
_sourceFileHandle
-
_sourceType
-
-
Constructor Details
-
AsmClassJavaClassInfo
-
-
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 classAsmTypeJavaClassType
-
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
-
getAsmType
- Specified by:
getAsmTypein interfaceIAsmJavaClassInfo
-
getComponentType
- Specified by:
getComponentTypein interfaceIJavaClassInfo- Specified by:
getComponentTypein interfaceIJavaClassType- Overrides:
getComponentTypein classAsmTypeJavaClassType
-
isArray
public boolean isArray()- Specified by:
isArrayin interfaceIJavaClassInfo- Specified by:
isArrayin interfaceIJavaClassType- Overrides:
isArrayin classAsmTypeJavaClassType
-
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- Specified by:
getEnclosingClassin classJavaSourceElement
-
getDeclaringClass
- Overrides:
getDeclaringClassin classJavaSourceElement
-
getEnclosingType
- Specified by:
getEnclosingTypein interfaceIJavaClassInfo
-
getNamespace
- Specified by:
getNamespacein interfaceIJavaClassType- Overrides:
getNamespacein classAsmTypeJavaClassType
-
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
-
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 classAsmTypeJavaClassType- 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 classAsmTypeJavaClassType- Returns:
- the hash code
-
toString
-
getBackingClass
- Specified by:
getBackingClassin interfaceIJavaClassInfo
-
getSourceFileHandle
- Specified by:
getSourceFileHandlein interfaceIJavaClassInfo
-
findSourceFile
-
makeClassFileName
-
getTree
public com.sun.source.tree.Tree getTree()- Specified by:
getTreein classJavaSourceElement
-
getCompilationUnitTree
public com.sun.source.tree.CompilationUnitTree getCompilationUnitTree()- Overrides:
getCompilationUnitTreein classJavaSourceElement
-
getSourcePositions
public com.sun.source.util.SourcePositions getSourcePositions()- Overrides:
getSourcePositionsin classJavaSourceElement
-
getStartPosition
public int getStartPosition()- Overrides:
getStartPositionin classJavaSourceElement
-
getEndPosition
public int getEndPosition()- Overrides:
getEndPositionin classJavaSourceElement
-
findSourceClass
-
getModule
- Specified by:
getModulein interfaceIJavaClassType- Specified by:
getModulein interfaceITypeInfoResolver- Overrides:
getModulein classAsmTypeJavaClassType
-
resolveType
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
getDeepestClassAtOffset
- Specified by:
getDeepestClassAtOffsetin interfaceIJavaClassInfo
-
resolveType
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveImport
- Specified by:
resolveImportin interfaceITypeInfoResolver
-