Class FilteringHelper
java.lang.Object
org.glassfish.jersey.message.filtering.spi.FilteringHelper
SPI utility methods for entity filtering.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Annotation[]
Empty annotation array.private static final ConcurrentMap
<Type, Class<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Class
<?> _getEntityClass
(Type genericType) Note: This method was copied fromMOXyJsonProvider
.static boolean
filterableEntityClass
(Class<?> clazz) Determine whether given class is filterable by entity-filtering.Get a set containing default filtering scope.static Class
<?> getEntityClass
(Type genericType) A convenience method to get the domain class (i.e.getPropertyMethods
(Class<?> clazz, boolean isGetter) Get accessor method mappings (field -> getter/setter) for given class.
-
Field Details
-
EMPTY_ANNOTATIONS
Empty annotation array. -
ENTITY_CLASSES
-
-
Constructor Details
-
FilteringHelper
private FilteringHelper()Prevent instantiation.
-
-
Method Details
-
filterableEntityClass
Determine whether given class is filterable by entity-filtering. Filterable classes are all classes that are not primitives and are not in a package matchingjava.*
.- Parameters:
clazz
- entity class to be examined.- Returns:
true
whether the class is filterable,false otherwise
.
-
getEntityClass
A convenience method to get the domain class (i.e. Customer) from the generic type (i.e. Customer, List<Customer>, JAXBElement<Customer>, JAXBElement<? extends Customer>, List<JAXBElement<Customer>>, or List<JAXBElement<? extends Customer>>).- Parameters:
genericType
- type to obtain entity domain class for.- Returns:
- entity domain class.
-
_getEntityClass
Note: This method was copied fromMOXyJsonProvider
. -
getPropertyMethods
Get accessor method mappings (field -> getter/setter) for given class.- Parameters:
clazz
- entity class to obtain property methods for.isGetter
- flag determining whether to look for getters or setters.- Returns:
- non-null map of field-accessor mappings.
-
getDefaultFilteringScope
Get a set containing default filtering scope.- Returns:
- default filtering scope.
-