Class ReflectiveHierarchyBuildItem
java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.MultiBuildItem
io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem
public final class ReflectiveHierarchyBuildItem
extends io.quarkus.builder.item.MultiBuildItem
Attempts to register a complete type hierarchy for reflection.
This is intended to be used to register types that are going to be serialized, e.g. by Jackson or some other JSON mapper.
This will do 'smart discovery' and in addition to registering the type itself it will also attempt to register the following:
- Superclasses
- Interfaces
- Component types of collections
- Types used in bean properties (if method reflection is enabled)
- Field types (if field reflection is enabled)
This discovery is applied recursively, so any additional types that are registered will also have their dependencies discovered.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionReflectiveHierarchyBuildItem(org.jboss.jandex.Type type) Deprecated.Use the Builder instead.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, String source) Deprecated.Use the Builder instead and provide a source for easy debugging.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate) Deprecated.Use the Builder instead and provide a source for easy debugging.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate, String source) Deprecated.Use the Builder instead and provide a source for easy debugging.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index) Deprecated.Use the Builder instead and provide a source for easy debugging.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index, String source) Deprecated.Use the Builder instead and provide a source for easy debugging.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate) Deprecated.Use the Builder instead and provide a source for easy debugging.ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate, String source) Deprecated.Use the Builder instead and provide a source for easy debugging. -
Method Summary
Modifier and TypeMethodDescriptionCreates a newReflectiveHierarchyBuildItem.Builderinstance, using the specified class for the underlyingTypewhich hierarchy is to be be registered for reflection.Creates a newReflectiveHierarchyBuildItem.Builderinstance, using the specified class for the underlyingTypewhich hierarchy is to be be registered for reflection.builder(org.jboss.jandex.DotName className) Creates a newReflectiveHierarchyBuildItem.Builderinstance, using the specified class for the underlyingTypewhich hierarchy is to be be registered for reflection.builder(org.jboss.jandex.Type type) Creates a newReflectiveHierarchyBuildItem.Builderinstance, initializing it with the specifiedTypePredicate<org.jboss.jandex.FieldInfo> Predicate<org.jboss.jandex.MethodInfo> Predicate<org.jboss.jandex.DotName> org.jboss.jandex.IndexViewgetIndex()org.jboss.jandex.TypegetType()booleanbooleanbooleanisFields()booleanbooleanbooleanboolean
-
Constructor Details
-
ReflectiveHierarchyBuildItem
Deprecated.Use the Builder instead. -
ReflectiveHierarchyBuildItem
@Deprecated public ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index) Deprecated.Use the Builder instead and provide a source for easy debugging. -
ReflectiveHierarchyBuildItem
@Deprecated public ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate) Deprecated.Use the Builder instead and provide a source for easy debugging. -
ReflectiveHierarchyBuildItem
@Deprecated public ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate) Deprecated.Use the Builder instead and provide a source for easy debugging. -
ReflectiveHierarchyBuildItem
Deprecated.Use the Builder instead and provide a source for easy debugging. -
ReflectiveHierarchyBuildItem
@Deprecated public ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index, String source) Deprecated.Use the Builder instead and provide a source for easy debugging. -
ReflectiveHierarchyBuildItem
@Deprecated public ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate, String source) Deprecated.Use the Builder instead and provide a source for easy debugging. -
ReflectiveHierarchyBuildItem
@Deprecated public ReflectiveHierarchyBuildItem(org.jboss.jandex.Type type, org.jboss.jandex.IndexView index, Predicate<org.jboss.jandex.DotName> ignoreTypePredicate, String source) Deprecated.Use the Builder instead and provide a source for easy debugging.
-
-
Method Details
-
getType
public org.jboss.jandex.Type getType() -
getIndex
public org.jboss.jandex.IndexView getIndex() -
getIgnoreTypePredicate
-
getIgnoreFieldPredicate
-
getIgnoreMethodPredicate
-
hasSource
public boolean hasSource() -
isConstructors
public boolean isConstructors() -
isMethods
public boolean isMethods() -
isFields
public boolean isFields() -
isSerialization
public boolean isSerialization() -
isUnsafeAllocated
public boolean isUnsafeAllocated() -
isIgnoreNested
public boolean isIgnoreNested() -
getSource
-
builder
Creates a newReflectiveHierarchyBuildItem.Builderinstance, using the specified class for the underlyingTypewhich hierarchy is to be be registered for reflection.- Parameters:
clazz- the Class which hierarchy is to be registered for reflection- Returns:
- a new
ReflectiveHierarchyBuildItem.Builderinstance, initialized from the specified Class
-
builder
Creates a newReflectiveHierarchyBuildItem.Builderinstance, using the specified class for the underlyingTypewhich hierarchy is to be be registered for reflection.- Parameters:
className- the name of the Class which hierarchy is to be registered for reflection- Returns:
- a new
ReflectiveHierarchyBuildItem.Builderinstance, initialized from the specified Class
-
builder
Creates a newReflectiveHierarchyBuildItem.Builderinstance, using the specified class for the underlyingTypewhich hierarchy is to be be registered for reflection.- Parameters:
className- theDotNameof the Class which hierarchy is to be registered for reflection- Returns:
- a new
ReflectiveHierarchyBuildItem.Builderinstance, initialized from the specified Class
-
builder
Creates a newReflectiveHierarchyBuildItem.Builderinstance, initializing it with the specifiedType- Parameters:
type- theTypewhich hierarchy is to be registered for reflection- Returns:
- a new
ReflectiveHierarchyBuildItem.Builderinstance, initialized from the specifiedType
-