Package gw.lang.reflect.java
Interface IJavaClassInfo
-
- All Superinterfaces:
IJavaAnnotatedElement
,IJavaClassType
,ITypeInfoResolver
,Serializable
- All Known Subinterfaces:
IAsmJavaClassInfo
,IClassJavaClassInfo
- All Known Implementing Classes:
AbstractJavaClassInfo
,AsmClassJavaClassInfo
,ClassJavaClassInfo
,ErrorJavaClassInfo
,JavaArrayClassInfo
,JavaSourceAnnotation
,JavaSourceClass
,JavaSourceEnum
,JavaSourceInterface
,JavaSourceType
,JavaSourceUnresolvedClass
public interface IJavaClassInfo extends IJavaAnnotatedElement, IJavaClassType, ITypeInfoResolver
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IJavaClassInfo.Util
-
Field Summary
Fields Modifier and Type Field Description static Object
LOCK
-
Fields inherited from interface gw.lang.reflect.java.IJavaClassType
EMPTY_ARRAY, ERROR_TYPE, NULL_TYPE
-
-
Method Summary
-
Methods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getAnnotation, getDeclaredAnnotations, getEnclosingClass, getLocationInfo, isAnnotationPresent
-
Methods inherited from interface gw.lang.reflect.java.IJavaClassType
getActualType, getActualType, getConcreteType, getModule, getName, getNamespace, getSimpleName, isAssignableFrom
-
Methods inherited from interface gw.lang.reflect.java.ITypeInfoResolver
getModule, resolveImport, resolveType, resolveType
-
-
-
-
Field Detail
-
LOCK
static final Object LOCK
-
-
Method Detail
-
getNameSignature
String getNameSignature()
-
getRelativeName
String getRelativeName()
-
getDisplayName
String getDisplayName()
-
isArray
boolean isArray()
- Specified by:
isArray
in interfaceIJavaClassType
-
isEnum
boolean isEnum()
-
isPrimitive
boolean isPrimitive()
-
isAnnotation
boolean isAnnotation()
-
isInterface
boolean isInterface()
-
isAssignableFrom
boolean isAssignableFrom(IJavaClassInfo aClass)
-
isPublic
boolean isPublic()
-
isProtected
boolean isProtected()
-
isInternal
boolean isInternal()
-
isPrivate
boolean isPrivate()
-
newInstance
Object newInstance() throws InstantiationException, IllegalAccessException
-
getMethod
IJavaClassMethod getMethod(String methodName, IJavaClassInfo... paramTypes) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
getDeclaredMethod
IJavaClassMethod getDeclaredMethod(String methodName, IJavaClassInfo... params) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
getDeclaredMethods
IJavaClassMethod[] getDeclaredMethods()
-
getMethodDescriptors
IJavaMethodDescriptor[] getMethodDescriptors()
-
getInterfaces
IJavaClassInfo[] getInterfaces()
-
getGenericInterfaces
IJavaClassType[] getGenericInterfaces()
-
getSuperclass
IJavaClassInfo getSuperclass()
-
getGenericSuperclass
IJavaClassType getGenericSuperclass()
-
getDeclaredFields
IJavaClassField[] getDeclaredFields()
-
getDeclaredField
default IJavaClassField getDeclaredField(String name)
-
getFields
IJavaClassField[] getFields()
-
getField
default IJavaClassField getField(String name)
-
getEnumConstants
Object[] getEnumConstants()
-
getPropertyDescriptors
IJavaPropertyDescriptor[] getPropertyDescriptors()
-
getDeclaredConstructors
IJavaClassConstructor[] getDeclaredConstructors()
-
getConstructor
IJavaClassConstructor getConstructor(IJavaClassInfo... params) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
getJavaType
IType getJavaType()
-
getTypeParameters
IJavaClassTypeVariable[] getTypeParameters()
-
createClassDocNode
IClassDocNode createClassDocNode()
-
hasCustomBeanInfo
boolean hasCustomBeanInfo()
-
isVisibleViaFeatureDescriptor
boolean isVisibleViaFeatureDescriptor(IScriptabilityModifier constraint)
-
isHiddenViaFeatureDescriptor
boolean isHiddenViaFeatureDescriptor()
-
getComponentType
IJavaClassInfo getComponentType()
- Specified by:
getComponentType
in interfaceIJavaClassType
-
getModifiers
int getModifiers()
-
getEnclosingType
IType getEnclosingType()
-
getArrayType
IJavaClassInfo getArrayType()
-
getDeclaredClasses
IJavaClassInfo[] getDeclaredClasses()
-
getBackingClass
Class getBackingClass()
-
getSourceFileHandle
ISourceFileHandle getSourceFileHandle()
-
equals
boolean equals(Object o)
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.
-
hashCode
int hashCode()
In order to maintain consistency withequals(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.
-
getDeepestClassAtOffset
default IJavaClassInfo getDeepestClassAtOffset(int offset)
-
isCompilable
default boolean isCompilable()
-
compile
default byte[] compile()
-
-