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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface gw.lang.reflect.java.IJavaClassType
EMPTY_ARRAY, ERROR_TYPE, NULL_TYPE
-
Method Summary
Modifier and TypeMethodDescriptiondefault byte[]
compile()
boolean
Two IJavaClassInfo instances are equal if they are both non-arrays and have the same name and module.getConstructor
(IJavaClassInfo... params) default IJavaClassField
getDeclaredField
(String name) getDeclaredMethod
(String methodName, IJavaClassInfo... params) default IJavaClassInfo
getDeepestClassAtOffset
(int offset) Object[]
default IJavaClassField
getMethod
(String methodName, IJavaClassInfo... paramTypes) int
boolean
int
hashCode()
In order to maintain consistency withequals(Object)
, the hash code of a non-array IJavaClassInfo must be computed as follows:boolean
boolean
isArray()
boolean
isAssignableFrom
(IJavaClassInfo aClass) default boolean
boolean
isEnum()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isPublic()
boolean
isVisibleViaFeatureDescriptor
(IScriptabilityModifier constraint) 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 Details
-
LOCK
-
-
Method Details
-
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
-
isPublic
boolean isPublic() -
isProtected
boolean isProtected() -
isInternal
boolean isInternal() -
isPrivate
boolean isPrivate() -
newInstance
-
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
-
getFields
IJavaClassField[] getFields() -
getField
-
getEnumConstants
Object[] getEnumConstants() -
getPropertyDescriptors
IJavaPropertyDescriptor[] getPropertyDescriptors() -
getDeclaredConstructors
IJavaClassConstructor[] getDeclaredConstructors() -
getConstructor
- Throws:
NoSuchMethodException
-
getJavaType
IType getJavaType() -
getTypeParameters
IJavaClassTypeVariable[] getTypeParameters() -
createClassDocNode
IClassDocNode createClassDocNode() -
hasCustomBeanInfo
boolean hasCustomBeanInfo() -
isVisibleViaFeatureDescriptor
-
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
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
-
isCompilable
default boolean isCompilable() -
compile
default byte[] compile()
-