Class JavaSourceType
- java.lang.Object
-
- gw.lang.reflect.java.JavaSourceElement
-
- gw.lang.reflect.java.AbstractJavaClassInfo
-
- gw.internal.gosu.parser.java.classinfo.JavaSourceType
-
- All Implemented Interfaces:
IJavaAnnotatedElement,IJavaClassInfo,IJavaClassType,ITypeInfoResolver,java.io.Serializable
- Direct Known Subclasses:
JavaSourceAnnotation,JavaSourceClass,JavaSourceEnum,JavaSourceInterface
public abstract class JavaSourceType extends AbstractJavaClassInfo implements ITypeInfoResolver
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gw.lang.reflect.java.IJavaClassInfo
IJavaClassInfo.Util
-
-
Field Summary
Fields Modifier and Type Field Description private IJavaClassField[]_allFieldsprotected java.util.Map<java.lang.String,java.lang.Object>_cacheprivate com.sun.source.tree.CompilationUnitTree_compilationUnitTreeprotected IJavaClassConstructor[]_constructorsprotected JavaSourceType_enclosingClassprivate java.lang.Object[]_enumConstantsprotected IJavaClassField[]_fieldsprivate ISourceFileHandle_fileHandleprotected java.lang.String_fullyQualifiedNameprotected IJavaClassType[]_genericInterfacesprotected IJavaClassType_genericSuperClassprotected IModule_gosuModuleprotected java.util.List<java.lang.String>_importListprotected IJavaClassInfo[]_innerClassesprotected IJavaClassInfo[]_interfacesprivate IType_javaTypeprivate IJavaMethodDescriptor[]_methodDescriptorsprotected IJavaClassMethod[]_methodsprotected JavaSourceModifierList_modifiersListprotected java.lang.String_namespaceprivate IJavaPropertyDescriptor[]_propertyDescriptorsprotected java.lang.String_simpleNameprivate com.sun.source.util.SourcePositions_sourcePositionsprivate java.util.List<java.lang.String>_staticImportListprivate IJavaClassInfo_superClassprivate com.sun.source.tree.ClassTree_typeDeclprotected IJavaClassTypeVariable[]_typeParametersprivate static java.lang.ObjectCACHE_MISSstatic intIGNORE_INTERFACESstatic intIGNORE_NONEstatic intIGNORE_SUPERCLASSprivate static java.util.Map<java.lang.String,java.lang.Class>PRIMITIVES-
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 Modifier Constructor Description protectedJavaSourceType(com.sun.source.tree.ClassTree typeDecl, JavaSourceType enclosingClass)For inner classes.protectedJavaSourceType(ISourceFileHandle fileHandle, com.sun.source.tree.CompilationUnitTree compilationUnitTree, com.sun.source.tree.ClassTree typeDecl, java.util.List<? extends com.sun.source.tree.ImportTree> imports, com.sun.source.util.SourcePositions sourcePositions, IModule gosuModule)For top level classes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]compile()IClassDocNodecreateClassDocNode()private static JavaSourceTypecreateInner(com.sun.source.tree.ClassTree typeDecl, JavaSourceType containingClass)static IJavaClassInfocreateTopLevel(ISourceFileHandle fileHandle, IModule gosuModule)static IJavaClassInfocreateTopLevel(ISourceFileHandle fileHandle, IModule gosuModule, javax.tools.DiagnosticCollector<javax.tools.JavaFileObject> errorHandler)static IJavaClassTypecreateType(ITypeInfoResolver typeResolver, com.sun.source.tree.Tree tree)static IJavaClassTypecreateType(ITypeInfoResolver typeResolver, java.lang.String typeName, int ignoreFlags)ITypegetActualType(TypeVarToTypeMap typeMap)ITypegetActualType(TypeVarToTypeMap typeMap, boolean bKeepTypeVars)IAnnotationInfogetAnnotation(java.lang.Class annotationClass)Returns this element's annotation for the specified type if such an annotation is present, else null.IJavaClassInfogetArrayType()java.lang.ClassgetBackingClass()private java.lang.ObjectgetCachedDetectCyclicType(java.lang.String relativeName)private IJavaClassInfogetClassInfo(java.lang.String fqn)com.sun.source.tree.CompilationUnitTreegetCompilationUnitTree()IJavaClassInfogetComponentType()IJavaClassTypegetConcreteType()IJavaClassConstructorgetConstructor(IJavaClassInfo... paramTypes)IAnnotationInfo[]getDeclaredAnnotations()Returns all annotations that are directly present on this element.IJavaClassInfo[]getDeclaredClasses()IJavaClassConstructor[]getDeclaredConstructors()IJavaClassField[]getDeclaredFields()IJavaClassMethodgetDeclaredMethod(java.lang.String methodName, IJavaClassInfo... paramTypes)IJavaClassMethod[]getDeclaredMethods()IJavaClassInfogetDeclaringClass()JavaSourceTypegetDeepestClassAtOffset(int offset)java.lang.StringgetDisplayName()IJavaClassInfogetEnclosingClass()ITypegetEnclosingType()intgetEndPosition()java.lang.Object[]getEnumConstants()IJavaClassField[]getFields()IJavaClassType[]getGenericInterfaces()IJavaClassTypegetGenericSuperclass()java.util.List<java.lang.String>getImportList()IJavaClassInfogetInnerClass(java.lang.String relativeName)IJavaClassInfo[]getInterfaces()private java.lang.StringgetJavaName()ITypegetJavaType()IJavaClassMethodgetMethod(java.lang.String methodName, IJavaClassInfo... paramTypes)IJavaMethodDescriptor[]getMethodDescriptors()IModifierListgetModifierList()intgetModifiers()IModulegetModule()java.lang.StringgetName()java.lang.StringgetNameSignature()java.lang.StringgetNamespace()IJavaPropertyDescriptor[]getPropertyDescriptors()java.lang.StringgetRelativeName()java.lang.StringgetSimpleName()ISourceFileHandlegetSourceFileHandle()com.sun.source.util.SourcePositionsgetSourcePositions()intgetStartPosition()java.util.List<java.lang.String>getStaticImports()IJavaClassInfogetSuperclass()private static com.sun.source.tree.ClassTreegetTopLevelDefinition(java.util.List<com.sun.source.tree.CompilationUnitTree> trees, java.lang.String relativeName)com.sun.source.tree.ClassTreegetTree()static java.lang.StringgetTypeName(com.sun.source.tree.Tree tree)IJavaClassTypeVariable[]getTypeParameters()TypeUsesMapgetTypeUsesMap()booleanhasCustomBeanInfo()private booleanhasCyclicInheritance(IJavaClassInfo superClass)voidinitMethodsAndConstructors()booleanisAnnotation()booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)Returns true if an annotation for the specified type is present on this element, else false.booleanisArray()booleanisClass()booleanisCompilable()booleanisEnum()booleanisHiddenViaFeatureDescriptor()booleanisInterface()booleanisInternal()booleanisPrimitive()booleanisPrivate()booleanisProtected()booleanisPublic()booleanisVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)protected voidmakeImportList(java.util.List<? extends com.sun.source.tree.ImportTree> imports)private IJavaClassInfomaybeLoadJavaStubIfGosuType(java.lang.String fqn)java.lang.ObjectnewInstance()private static booleanparseJavaFile(ISourceFileHandle src, java.util.List<com.sun.source.tree.CompilationUnitTree> trees, com.sun.source.util.SourcePositions[] sourcePositions, javax.tools.DiagnosticCollector<javax.tools.JavaFileObject> errorHandler, com.sun.source.util.DocTrees[] docTrees)private IJavaClassTyperesolveClassInSamePackage(java.lang.String relativeName)IJavaClassTyperesolveImport(java.lang.String relativeName)private static IJavaClassTyperesolveParameterizedArrayType(ITypeInfoResolver typeResolver, com.sun.source.tree.Tree tree, java.lang.String typeName)private static IJavaClassTyperesolveParameterizedType(ITypeInfoResolver typeResolver, com.sun.source.tree.Tree typeNode, java.lang.String typeName)private IJavaClassTyperesolveQualifiedOrSemiQualifiedType(java.lang.String typeName, IJavaClassInfo whosAskin, int iDot, int ignoreFlags)private IJavaClassTyperesolveRootQualifiedType(java.lang.String qname)private IJavaClassTyperesolveTrailingInnerClass(IJavaClassType rootType, java.lang.String fullNameIncludingRoot, IJavaClassInfo whosAskin)IJavaClassTyperesolveType(java.lang.String relativeName, int ignoreFlags)IJavaClassTyperesolveType(java.lang.String relativeName, IJavaClassInfo whosAskin, int ignoreFlags)voidsetJavaType(IJavaType javaType)java.lang.StringtoString()-
Methods inherited from class gw.lang.reflect.java.AbstractJavaClassInfo
equals, equals, hashCode, hashCode, isAssignableFrom, isAssignableFrom
-
Methods inherited from class gw.lang.reflect.java.JavaSourceElement
findInnerSourceType, getLocationInfo
-
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
getDeclaredField, getField
-
Methods inherited from interface gw.lang.reflect.java.IJavaClassType
isAssignableFrom
-
-
-
-
Field Detail
-
IGNORE_NONE
public static final int IGNORE_NONE
- See Also:
- Constant Field Values
-
IGNORE_INTERFACES
public static final int IGNORE_INTERFACES
- See Also:
- Constant Field Values
-
IGNORE_SUPERCLASS
public static final int IGNORE_SUPERCLASS
- See Also:
- Constant Field Values
-
PRIMITIVES
private static java.util.Map<java.lang.String,java.lang.Class> PRIMITIVES
-
CACHE_MISS
private static final java.lang.Object CACHE_MISS
-
_gosuModule
protected IModule _gosuModule
-
_fullyQualifiedName
protected java.lang.String _fullyQualifiedName
-
_namespace
protected java.lang.String _namespace
-
_simpleName
protected java.lang.String _simpleName
-
_importList
protected java.util.List<java.lang.String> _importList
-
_enclosingClass
protected JavaSourceType _enclosingClass
-
_fields
protected IJavaClassField[] _fields
-
_methods
protected IJavaClassMethod[] _methods
-
_modifiersList
protected JavaSourceModifierList _modifiersList
-
_innerClasses
protected IJavaClassInfo[] _innerClasses
-
_constructors
protected IJavaClassConstructor[] _constructors
-
_interfaces
protected IJavaClassInfo[] _interfaces
-
_genericSuperClass
protected IJavaClassType _genericSuperClass
-
_typeParameters
protected IJavaClassTypeVariable[] _typeParameters
-
_genericInterfaces
protected IJavaClassType[] _genericInterfaces
-
_allFields
private IJavaClassField[] _allFields
-
_enumConstants
private java.lang.Object[] _enumConstants
-
_propertyDescriptors
private IJavaPropertyDescriptor[] _propertyDescriptors
-
_superClass
private IJavaClassInfo _superClass
-
_methodDescriptors
private IJavaMethodDescriptor[] _methodDescriptors
-
_cache
protected java.util.Map<java.lang.String,java.lang.Object> _cache
-
_fileHandle
private ISourceFileHandle _fileHandle
-
_staticImportList
private java.util.List<java.lang.String> _staticImportList
-
_compilationUnitTree
private com.sun.source.tree.CompilationUnitTree _compilationUnitTree
-
_sourcePositions
private com.sun.source.util.SourcePositions _sourcePositions
-
_typeDecl
private com.sun.source.tree.ClassTree _typeDecl
-
_javaType
private IType _javaType
-
-
Constructor Detail
-
JavaSourceType
protected JavaSourceType(ISourceFileHandle fileHandle, com.sun.source.tree.CompilationUnitTree compilationUnitTree, com.sun.source.tree.ClassTree typeDecl, java.util.List<? extends com.sun.source.tree.ImportTree> imports, com.sun.source.util.SourcePositions sourcePositions, IModule gosuModule)
For top level classes.
-
JavaSourceType
protected JavaSourceType(com.sun.source.tree.ClassTree typeDecl, JavaSourceType enclosingClass)For inner classes.
-
-
Method Detail
-
createTopLevel
public static IJavaClassInfo createTopLevel(ISourceFileHandle fileHandle, IModule gosuModule)
-
createTopLevel
public static IJavaClassInfo createTopLevel(ISourceFileHandle fileHandle, IModule gosuModule, javax.tools.DiagnosticCollector<javax.tools.JavaFileObject> errorHandler)
-
getTopLevelDefinition
private static com.sun.source.tree.ClassTree getTopLevelDefinition(java.util.List<com.sun.source.tree.CompilationUnitTree> trees, java.lang.String relativeName)
-
parseJavaFile
private static boolean parseJavaFile(ISourceFileHandle src, java.util.List<com.sun.source.tree.CompilationUnitTree> trees, com.sun.source.util.SourcePositions[] sourcePositions, javax.tools.DiagnosticCollector<javax.tools.JavaFileObject> errorHandler, com.sun.source.util.DocTrees[] docTrees)
-
createInner
private static JavaSourceType createInner(com.sun.source.tree.ClassTree typeDecl, JavaSourceType containingClass)
-
resolveParameterizedArrayType
private static IJavaClassType resolveParameterizedArrayType(ITypeInfoResolver typeResolver, com.sun.source.tree.Tree tree, java.lang.String typeName)
-
createType
public static IJavaClassType createType(ITypeInfoResolver typeResolver, com.sun.source.tree.Tree tree)
-
resolveParameterizedType
private static IJavaClassType resolveParameterizedType(ITypeInfoResolver typeResolver, com.sun.source.tree.Tree typeNode, java.lang.String typeName)
-
createType
public static IJavaClassType createType(ITypeInfoResolver typeResolver, java.lang.String typeName, int ignoreFlags)
-
makeImportList
protected void makeImportList(java.util.List<? extends com.sun.source.tree.ImportTree> imports)
-
getModule
public IModule getModule()
- Specified by:
getModulein interfaceIJavaClassType- Specified by:
getModulein interfaceITypeInfoResolver
-
getNameSignature
public java.lang.String getNameSignature()
- Specified by:
getNameSignaturein interfaceIJavaClassInfo
-
getRelativeName
public java.lang.String getRelativeName()
- Specified by:
getRelativeNamein interfaceIJavaClassInfo
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayNamein interfaceIJavaClassInfo
-
getSimpleName
public java.lang.String getSimpleName()
- Specified by:
getSimpleNamein interfaceIJavaClassType
-
isArray
public boolean isArray()
- Specified by:
isArrayin interfaceIJavaClassInfo- Specified by:
isArrayin interfaceIJavaClassType
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceIJavaClassType
-
getInterfaces
public IJavaClassInfo[] getInterfaces()
- Specified by:
getInterfacesin interfaceIJavaClassInfo
-
getTypeName
public static java.lang.String getTypeName(com.sun.source.tree.Tree tree)
-
getGenericInterfaces
public IJavaClassType[] getGenericInterfaces()
- Specified by:
getGenericInterfacesin interfaceIJavaClassInfo
-
getSuperclass
public IJavaClassInfo getSuperclass()
- Specified by:
getSuperclassin interfaceIJavaClassInfo
-
hasCyclicInheritance
private boolean hasCyclicInheritance(IJavaClassInfo superClass)
-
getGenericSuperclass
public IJavaClassType getGenericSuperclass()
- Specified by:
getGenericSuperclassin interfaceIJavaClassInfo
-
initMethodsAndConstructors
public void initMethodsAndConstructors()
-
getDeclaredMethods
public IJavaClassMethod[] getDeclaredMethods()
- Specified by:
getDeclaredMethodsin interfaceIJavaClassInfo
-
getDeclaredConstructors
public IJavaClassConstructor[] getDeclaredConstructors()
- Specified by:
getDeclaredConstructorsin interfaceIJavaClassInfo
-
getConstructor
public IJavaClassConstructor getConstructor(IJavaClassInfo... paramTypes) throws java.lang.NoSuchMethodException
- Specified by:
getConstructorin interfaceIJavaClassInfo- Throws:
java.lang.NoSuchMethodException
-
getDeclaredFields
public IJavaClassField[] getDeclaredFields()
- Specified by:
getDeclaredFieldsin interfaceIJavaClassInfo
-
getFields
public IJavaClassField[] getFields()
- Specified by:
getFieldsin interfaceIJavaClassInfo
-
getEnumConstants
public java.lang.Object[] getEnumConstants()
- Specified by:
getEnumConstantsin interfaceIJavaClassInfo
-
getPropertyDescriptors
public IJavaPropertyDescriptor[] getPropertyDescriptors()
- Specified by:
getPropertyDescriptorsin interfaceIJavaClassInfo
-
getJavaType
public IType getJavaType()
- Specified by:
getJavaTypein interfaceIJavaClassInfo
-
setJavaType
public void setJavaType(IJavaType javaType)
-
getTypeParameters
public IJavaClassTypeVariable[] getTypeParameters()
- Specified by:
getTypeParametersin interfaceIJavaClassInfo
-
createClassDocNode
public IClassDocNode createClassDocNode()
- Specified by:
createClassDocNodein interfaceIJavaClassInfo
-
hasCustomBeanInfo
public boolean hasCustomBeanInfo()
- Specified by:
hasCustomBeanInfoin interfaceIJavaClassInfo
-
isVisibleViaFeatureDescriptor
public boolean isVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)
- Specified by:
isVisibleViaFeatureDescriptorin interfaceIJavaClassInfo
-
isHiddenViaFeatureDescriptor
public boolean isHiddenViaFeatureDescriptor()
- Specified by:
isHiddenViaFeatureDescriptorin interfaceIJavaClassInfo
-
getComponentType
public IJavaClassInfo getComponentType()
- Specified by:
getComponentTypein interfaceIJavaClassInfo- Specified by:
getComponentTypein interfaceIJavaClassType
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin interfaceIJavaClassInfo
-
getModifierList
public IModifierList getModifierList()
-
getEnclosingType
public IType getEnclosingType()
- Specified by:
getEnclosingTypein interfaceIJavaClassInfo
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespacein interfaceIJavaClassType
-
getArrayType
public IJavaClassInfo getArrayType()
- Specified by:
getArrayTypein interfaceIJavaClassInfo
-
getDeclaredClasses
public IJavaClassInfo[] getDeclaredClasses()
- Specified by:
getDeclaredClassesin interfaceIJavaClassInfo
-
getBackingClass
public java.lang.Class getBackingClass()
- Specified by:
getBackingClassin interfaceIJavaClassInfo
-
getJavaName
private java.lang.String getJavaName()
-
getInnerClass
public IJavaClassInfo getInnerClass(java.lang.String relativeName)
-
getActualType
public IType getActualType(TypeVarToTypeMap typeMap)
- Specified by:
getActualTypein interfaceIJavaClassType
-
getActualType
public IType getActualType(TypeVarToTypeMap typeMap, boolean bKeepTypeVars)
- Specified by:
getActualTypein interfaceIJavaClassType
-
getConcreteType
public IJavaClassType getConcreteType()
- Specified by:
getConcreteTypein interfaceIJavaClassType
-
isClass
public boolean isClass()
-
isInterface
public boolean isInterface()
- Specified by:
isInterfacein interfaceIJavaClassInfo
-
newInstance
public java.lang.Object newInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException- Specified by:
newInstancein interfaceIJavaClassInfo- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessException
-
getMethod
public IJavaClassMethod getMethod(java.lang.String methodName, IJavaClassInfo... paramTypes) throws java.lang.NoSuchMethodException
- Specified by:
getMethodin interfaceIJavaClassInfo- Throws:
java.lang.NoSuchMethodException
-
getDeclaredMethod
public IJavaClassMethod getDeclaredMethod(java.lang.String methodName, IJavaClassInfo... paramTypes) throws java.lang.NoSuchMethodException
- Specified by:
getDeclaredMethodin interfaceIJavaClassInfo- Throws:
java.lang.NoSuchMethodException
-
getMethodDescriptors
public IJavaMethodDescriptor[] getMethodDescriptors()
- Specified by:
getMethodDescriptorsin interfaceIJavaClassInfo
-
isEnum
public boolean isEnum()
- Specified by:
isEnumin interfaceIJavaClassInfo
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein interfaceIJavaClassInfo
-
isAnnotation
public boolean isAnnotation()
- Specified by:
isAnnotationin interfaceIJavaClassInfo
-
isPublic
public boolean isPublic()
- Specified by:
isPublicin interfaceIJavaClassInfo
-
isProtected
public boolean isProtected()
- Specified by:
isProtectedin interfaceIJavaClassInfo
-
isPrivate
public boolean isPrivate()
- Specified by:
isPrivatein interfaceIJavaClassInfo
-
isInternal
public boolean isInternal()
- Specified by:
isInternalin interfaceIJavaClassInfo
-
resolveType
public IJavaClassType resolveType(java.lang.String relativeName, int ignoreFlags)
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveType
public IJavaClassType resolveType(java.lang.String relativeName, IJavaClassInfo whosAskin, int ignoreFlags)
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
getCachedDetectCyclicType
private java.lang.Object getCachedDetectCyclicType(java.lang.String relativeName)
-
resolveQualifiedOrSemiQualifiedType
private IJavaClassType resolveQualifiedOrSemiQualifiedType(java.lang.String typeName, IJavaClassInfo whosAskin, int iDot, int ignoreFlags)
-
resolveRootQualifiedType
private IJavaClassType resolveRootQualifiedType(java.lang.String qname)
-
getClassInfo
private IJavaClassInfo getClassInfo(java.lang.String fqn)
-
maybeLoadJavaStubIfGosuType
private IJavaClassInfo maybeLoadJavaStubIfGosuType(java.lang.String fqn)
-
resolveTrailingInnerClass
private IJavaClassType resolveTrailingInnerClass(IJavaClassType rootType, java.lang.String fullNameIncludingRoot, IJavaClassInfo whosAskin)
-
resolveClassInSamePackage
private IJavaClassType resolveClassInSamePackage(java.lang.String relativeName)
-
resolveImport
public IJavaClassType resolveImport(java.lang.String relativeName)
- Specified by:
resolveImportin interfaceITypeInfoResolver
-
getEnclosingClass
public IJavaClassInfo getEnclosingClass()
- Specified by:
getEnclosingClassin interfaceIJavaAnnotatedElement- Specified by:
getEnclosingClassin classJavaSourceElement
-
getDeclaringClass
public IJavaClassInfo getDeclaringClass()
- Overrides:
getDeclaringClassin classJavaSourceElement
-
getDeepestClassAtOffset
public JavaSourceType getDeepestClassAtOffset(int offset)
- Specified by:
getDeepestClassAtOffsetin interfaceIJavaClassInfo
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
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
public IAnnotationInfo getAnnotation(java.lang.Class annotationClass)
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
public IAnnotationInfo[] 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
-
getTypeUsesMap
public TypeUsesMap getTypeUsesMap()
-
getImportList
public java.util.List<java.lang.String> getImportList()
-
getStaticImports
public java.util.List<java.lang.String> getStaticImports()
-
getSourceFileHandle
public ISourceFileHandle getSourceFileHandle()
- Specified by:
getSourceFileHandlein interfaceIJavaClassInfo
-
isCompilable
public boolean isCompilable()
- Specified by:
isCompilablein interfaceIJavaClassInfo
-
compile
public byte[] compile()
- Specified by:
compilein interfaceIJavaClassInfo
-
getTree
public com.sun.source.tree.ClassTree 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
-
-