Class EntityInspectorImpl
java.lang.Object
org.glassfish.jersey.message.filtering.EntityInspectorImpl
- All Implemented Interfaces:
EntityInspector
Class responsible for inspecting entity classes. This class invokes all available
entity processors in
different contexts.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntityInspectorImpl(InjectionManager injectionManager) Constructor expectingInjectionManagerto be injected. -
Method Summary
Modifier and TypeMethodDescriptionvoidInspect entity class and create/updateEntityGraphfor reader/writer.private booleaninspectEntityClass(Class<?> entityClass, EntityGraph graph, boolean forWriter) Invoke availableEntityProcessors on given entity class.inspectEntityProperties(Class<?> entityClass, EntityGraph graph, Set<Class<?>> inspect, boolean forWriter) Invoke availableEntityProcessors on fields of given entity class.private voidinspectStandaloneAccessors(Map<String, Method> unprocessedAccessors, EntityGraph graph, boolean forWriter) Invoke availableEntityProcessors on accessors (getter/setter) that has no match in classes' fields.
-
Field Details
-
entityProcessors
-
graphProvider
-
-
Constructor Details
-
EntityInspectorImpl
Constructor expectingInjectionManagerto be injected.- Parameters:
injectionManager- injection manager to be injected.
-
-
Method Details
-
inspect
Description copied from interface:EntityInspectorInspect entity class and create/updateEntityGraphfor reader/writer. The entity graph will be used to create entity-filtering object which is requested by#createFilteringObject(...).Method recursively inspects entity fields classes suitable for inspecting.
Method uses
EntityProcessors for inspecting.- Specified by:
inspectin interfaceEntityInspector- Parameters:
entityClass- entity class to be examined.forWriter- flag determining whether the class should be examined for reader or writer.
-
inspectEntityClass
Invoke availableEntityProcessors on given entity class.- Parameters:
entityClass- entity class to be examined.graph- entity graph to be modified by examination.forWriter- flag determining whether the class should be examined for reader or writer.- Returns:
trueif the inspecting should be roll-backed,falseotherwise.
-
inspectEntityProperties
private Map<String,Method> inspectEntityProperties(Class<?> entityClass, EntityGraph graph, Set<Class<?>> inspect, boolean forWriter) Invoke availableEntityProcessors on fields of given entity class. Method returns a map (fieldName,method) of unprocessed property accessors (getters/setters) and fillsinspectset with entity classes that should be further processed.- Parameters:
entityClass- entity class to obtain properties to be examined.graph- entity graph to be modified by examination.inspect- non-null set of classes to-be-examined.forWriter- flag determining whether the class should be examined for reader or writer.- Returns:
- map of unprocessed property accessors.
-
inspectStandaloneAccessors
private void inspectStandaloneAccessors(Map<String, Method> unprocessedAccessors, EntityGraph graph, boolean forWriter) Invoke availableEntityProcessors on accessors (getter/setter) that has no match in classes' fields.- Parameters:
unprocessedAccessors- map of unprocessed accessors.graph- entity graph to be modified by examination.forWriter- flag determining whether the class should be examined for reader or writer.
-