Package org.mapfish.print.parser
Class ParserUtils
java.lang.Object
org.mapfish.print.parser.ParserUtils
Utility method for getting and setting parameters on Processor Input and Output objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA filter (for the get attribute methods) that selects only the attributes that are final.A filter (for the get attribute methods) that selects only the attributes that are NOT required and excludes all of those that are considered required.A filter (for the get attribute methods) that selects only the attributes that are non final.A filter (for the get attribute methods) that selects only the attributes that are required and excludes all of those with defaults, and therefore are considered optional. -
Method Summary
Modifier and TypeMethodDescriptiongetAllAttributeNames
(Class<?> classToInspect) Converts all non-final properties ingetAllAttributes(Class)
to a set of the attribute names.static Collection<Field>
getAllAttributes
(Class<?> classToInspect) Inspects the object and all superclasses for public, non-final, accessible methods and returns a collection containing all the attributes found.getAttributeNames
(Class<?> classToInspect, Predicate<Field> filter) Converts all properties ingetAllAttributes(Class)
to a set of the attribute names.static Collection<Field>
getAttributes
(Class<?> classToInspect, Predicate<Field> filter) Get a subset of the attributes of the provided class.
-
Field Details
-
FILTER_ONLY_REQUIRED_ATTRIBUTES
A filter (for the get attribute methods) that selects only the attributes that are required and excludes all of those with defaults, and therefore are considered optional. -
FILTER_HAS_DEFAULT_ATTRIBUTES
A filter (for the get attribute methods) that selects only the attributes that are NOT required and excludes all of those that are considered required. -
FILTER_NON_FINAL_FIELDS
A filter (for the get attribute methods) that selects only the attributes that are non final. (Can be modified) -
FILTER_FINAL_FIELDS
A filter (for the get attribute methods) that selects only the attributes that are final. (Can NOT be modified)
-
-
Method Details
-
getAllAttributes
Inspects the object and all superclasses for public, non-final, accessible methods and returns a collection containing all the attributes found.- Parameters:
classToInspect
- the class under inspection.
-
getAttributes
Get a subset of the attributes of the provided class. An attribute is each public field in the class or super class.- Parameters:
classToInspect
- the class to inspectfilter
- a predicate that returns true when a attribute should be kept in resulting collection.
-
getAllAttributeNames
Converts all non-final properties ingetAllAttributes(Class)
to a set of the attribute names.- Parameters:
classToInspect
- the class to inspect
-
getAttributeNames
Converts all properties ingetAllAttributes(Class)
to a set of the attribute names.- Parameters:
classToInspect
- the class to inspectfilter
- a predicate that returns true when a attribute should be kept in resulting collection.
-