Class MirrorTypeFactory
java.lang.Object
org.infinispan.protostream.annotations.impl.processor.types.MirrorTypeFactory
- All Implemented Interfaces:
XTypeFactory
Implementation relying primarily on
TypeMirror, but also capable to use reflection
similarly to ReflectionTypeFactory.- Since:
- 4.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate classOnly for declared types, not for primitives, arrays, or void.private final classprivate final classprivate final classprivate final classprivate final classA primitive type or void. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate final Elementsprivate static final XClass[]private final MirrorTypeFactory.MirrorPrimitiveTypeprivate final booleanprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate static final Logprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate final MirrorTypeFactory.MirrorPrimitiveTypeprivate final Typesprivate final MirrorTypeFactory.MirrorPrimitiveType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWraps the given Class in an XClass.fromTypeMirror(TypeMirror typeMirror) Wraps the given TypeMirror in an XClass.private static intgetModifiersOfElement(Element element) Translate the given element modifiers from javax.lang.model.element.Modifier to java.lang.reflect.Modifier.private TypeMirrorgetTypeMirror(String typeName)
-
Field Details
-
log
-
EMPTY_XCLASS_ARRAY
-
elements
-
types
-
classCache
-
voidType
-
booleanType
-
byteType
-
shortType
-
intType
-
longType
-
charType
-
floatType
-
doubleType
-
fullyQualifiedAnnotations
private final boolean fullyQualifiedAnnotations
-
-
Constructor Details
-
MirrorTypeFactory
-
-
Method Details
-
fromClass
Description copied from interface:XTypeFactoryWraps the given Class in an XClass. Implementation must be idempotent. The returned value must be reference-identical.- Specified by:
fromClassin interfaceXTypeFactory- Parameters:
c- can be null- Returns:
- the wrapper XClass, or null iff the actual argument is null
-
fromTypeMirror
Wraps the given TypeMirror in an XClass. Implementation must be idempotent. The returned value must be reference-identical.- Parameters:
typeMirror- can be null- Returns:
- the wrapper XClass, or null iff the actual argument is null
-
getModifiersOfElement
Translate the given element modifiers from javax.lang.model.element.Modifier to java.lang.reflect.Modifier. -
getTypeMirror
-