Class EntityFilteringHelper

java.lang.Object
org.glassfish.jersey.message.filtering.EntityFilteringHelper

final class EntityFilteringHelper extends Object
Utility methods for Entity Data Filtering.
  • Constructor Details

    • EntityFilteringHelper

      private EntityFilteringHelper()
      Prevent instantiation.
  • Method Details

    • getFilteringScopes

      public static Set<String> getFilteringScopes(Annotation[] annotations)
      Get entity-filtering scopes from given annotations. Scopes are only derived from entity-filtering annotations.
      Parameters:
      annotations - list of arbitrary annotations.
      Returns:
      a set of entity-filtering scopes.
    • getFilteringScopes

      public static Set<String> getFilteringScopes(Annotation[] annotations, boolean filter)
      Get entity-filtering scopes from given annotations. Scopes are only derived from entity-filtering annotations.
      Parameters:
      annotations - list of arbitrary annotations.
      filter - true whether the given annotation should be reduced to only entity-filtering annotations, false otherwise.
      Returns:
      a set of entity-filtering scopes.
    • getFilteringAnnotations

      public static Annotation[] getFilteringAnnotations(Annotation[] annotations)
      Filter given annotations and return only entity-filtering ones.
      Parameters:
      annotations - list of arbitrary annotations.
      Returns:
      entity-filtering annotations or an empty array.
    • getAnnotation

      public static <T extends Annotation> T getAnnotation(Annotation[] annotations, Class<T> clazz)