Class ReflectionTypeFactory.ReflectionClass
java.lang.Object
org.infinispan.protostream.annotations.impl.types.ReflectionTypeFactory.ReflectionClass
- Enclosing class:
ReflectionTypeFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<?> private final Map<Constructor<?>, ReflectionTypeFactory.ReflectionConstructor> private final Map<Field, ReflectionTypeFactory.ReflectionEnumConstant> private final Map<Field, ReflectionTypeFactory.ReflectionField> private final Map<Method, ReflectionTypeFactory.ReflectionMethod> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Class<?>[]argsAsClass(XClass[] xArgTypes) Class<?> asClass()This is the only place we can get back the java.lang.Class object and should be used very sparingly.cacheConstructor(Constructor<?> ctor) cacheField(Field field) cacheMethod(Method method) booleanprivate MethodfindMethod(Class<?> clazz, String methodName, Class<?>[] argTypes) Finds a method given its name and argument types in this class, superclass and all superinterfaces.<A extends Annotation>
AgetAnnotation(Class<A> annotationClass) Returns this element's annotation if present.<A extends Annotation>
A[]getAnnotationsByType(Class<A> annotationClass) Array component type, for arrays only.getDeclaredConstructor(XClass... xArgTypes) Iterable<? extends XConstructor> Collect and concatenate the description text from the (possibly multiple)@ProtoDoc.valueannotations found on the element, in order of occurrence.getEnumConstant(String name) Iterable<? extends XEnumConstant> Enum constants, for enums only.String[]Gets the actual type params of an interface implemented directly by this class or all its supers.XClass[]Directly implemented interfaces.intThe modifiers, as per java.lang.reflect.Modifier.getName()inthashCode()booleanisArray()booleanisAssignableTo(XClass other) booleanisEnum()booleanisLocal()Is it a local or anonymous class?booleantoString()Methods inherited from interface XClass
isAbstract, isAssignableTo, isInterface, isRecord
-
Field Details
-
clazz
-
enumConstants
-
constructorCache
-
methodCache
-
fieldCache
-
-
Constructor Details
-
ReflectionClass
ReflectionClass(Class<?> clazz)
-
-
Method Details
-
getFactory
- Specified by:
getFactoryin interfaceXClass
-
asClass
Description copied from interface:XClassThis is the only place we can get back the java.lang.Class object and should be used very sparingly. Some implementations can throwUnsupportedOperationException. -
getName
-
getSimpleName
- Specified by:
getSimpleNamein interfaceXClass
-
getCanonicalName
- Specified by:
getCanonicalNamein interfaceXClass
-
getPackageName
- Specified by:
getPackageNamein interfaceXClass
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceXClass
-
isEnum
-
isArray
-
getComponentType
Description copied from interface:XClassArray component type, for arrays only.- Specified by:
getComponentTypein interfaceXClass
-
getEnclosingClass
- Specified by:
getEnclosingClassin interfaceXClass
-
getSuperclass
- Specified by:
getSuperclassin interfaceXClass
-
getInterfaces
Description copied from interface:XClassDirectly implemented interfaces.- Specified by:
getInterfacesin interfaceXClass
-
getGenericInterfaceParameterTypes
Description copied from interface:XClassGets the actual type params of an interface implemented directly by this class or all its supers.- Specified by:
getGenericInterfaceParameterTypesin interfaceXClass
-
isAssignableTo
- Specified by:
isAssignableToin interfaceXClass
-
getAnnotation
Description copied from interface:XElementReturns this element's annotation if present.- Specified by:
getAnnotationin interfaceXElement
-
getAnnotationsByType
- Specified by:
getAnnotationsByTypein interfaceXElement
-
getDocumentation
Description copied from interface:XElementCollect and concatenate the description text from the (possibly multiple)@ProtoDoc.valueannotations found on the element, in order of occurrence.- Specified by:
getDocumentationin interfaceXElement- Returns:
- the documentation or
nullif no doc or empty doc present
-
getModifiers
public int getModifiers()Description copied from interface:XElementThe modifiers, as per java.lang.reflect.Modifier.- Specified by:
getModifiersin interfaceXElement
-
cacheMethod
-
cacheConstructor
-
cacheField
-
getDeclaredConstructor
- Specified by:
getDeclaredConstructorin interfaceXClass
-
getDeclaredConstructors
- Specified by:
getDeclaredConstructorsin interfaceXClass
-
getDeclaredMethods
- Specified by:
getDeclaredMethodsin interfaceXClass
-
getMethod
-
findMethod
-
argsAsClass
-
isLocal
-
getDeclaredFields
- Specified by:
getDeclaredFieldsin interfaceXClass
-
getEnumConstants
Description copied from interface:XClassEnum constants, for enums only.- Specified by:
getEnumConstantsin interfaceXClass
-
getEnumConstant
- Specified by:
getEnumConstantin interfaceXClass
-
equals
-
hashCode
-
toString
-