Class MirrorTypeFactory.MirrorClass
java.lang.Object
org.infinispan.protostream.annotations.impl.processor.types.MirrorTypeFactory.MirrorClass
- All Implemented Interfaces:
HasModelElement,XClass,XElement
- Enclosing class:
MirrorTypeFactory
Only for declared types, not for primitives, arrays, or void.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ExecutableElement, MirrorTypeFactory.MirrorConstructor> private final Map<VariableElement, MirrorTypeFactory.MirrorEnumConstant> private final Map<VariableElement, MirrorTypeFactory.MirrorField> private final Map<ExecutableElement, MirrorTypeFactory.MirrorMethod> private final intprivate final TypeElementprivate final DeclaredType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> asClass()This is the only place we can get back the java.lang.Class object and should be used very sparingly.private MirrorTypeFactory.MirrorFieldcacheField(VariableElement field) private MirrorTypeFactory.MirrorMethodcacheMethod(ExecutableElement method) booleanprivate ExecutableElementfindExecutableElement(boolean isConstructor, String name, XClass[] argTypes) <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... argTypes) Iterable<? extends XConstructor> Collect and concatenate the description text from the (possibly multiple)@ProtoDoc.valueannotations found on the element, in order of occurrence.Get theElement, nevernull.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.private String[]getGenericInterfaceParameterTypes(TypeMirror typeMirror, TypeMirror i) XClass[]Directly implemented interfaces.intThe modifiers, as per java.lang.reflect.Modifier.getName()inthashCode()booleanisArray()booleanbooleanisEnum()booleanisLocal()Is it a local or anonymous class?booleantoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.protostream.annotations.impl.types.XClass
isAbstract, isAssignableTo, isInterface, isRecord
-
Field Details
-
typeMirror
-
typeElement
-
enumConstants
-
constructorCache
-
methodCache
-
fieldCache
-
modifiers
private final int modifiers
-
-
Constructor Details
-
MirrorClass
MirrorClass(DeclaredType typeMirror)
-
-
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
public boolean isEnum() -
getEnumConstants
Description copied from interface:XClassEnum constants, for enums only.- Specified by:
getEnumConstantsin interfaceXClass
-
getEnumConstant
- Specified by:
getEnumConstantin interfaceXClass
-
isArray
public boolean 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
-
getGenericInterfaceParameterTypes
-
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
-
getMethod
-
findExecutableElement
private ExecutableElement findExecutableElement(boolean isConstructor, String name, XClass[] argTypes) -
getDeclaredFields
- Specified by:
getDeclaredFieldsin interfaceXClass
-
getModifiers
public int getModifiers()Description copied from interface:XElementThe modifiers, as per java.lang.reflect.Modifier.- Specified by:
getModifiersin interfaceXElement
-
isLocal
public boolean isLocal()Description copied from interface:XClassIs it a local or anonymous class? -
getDeclaredConstructor
- Specified by:
getDeclaredConstructorin interfaceXClass
-
getDeclaredConstructors
- Specified by:
getDeclaredConstructorsin interfaceXClass
-
getDeclaredMethods
- Specified by:
getDeclaredMethodsin interfaceXClass
-
cacheMethod
-
cacheConstructor
-
cacheField
-
getElement
Description copied from interface:HasModelElementGet theElement, nevernull.- Specified by:
getElementin interfaceHasModelElement- Returns:
- the
Element, nevernull
-
equals
-
hashCode
public int hashCode() -
toString
-