Class PAnnotation
java.lang.Object
tools.refinery.interpreter.matchers.psystem.annotations.PAnnotation
A container describing query annotations
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String attributeName, Object value) Adds an attribute to the annotationvoidforEachValue(BiConsumer<String, Object> consumer) Executes a consumer over all attributes.Returns a set of all attribute names used in this annotationgetAllValues(String attributeName) Returns all values of a selected attributegetFirstValue(String attributeName) Returns the value of the first occurrence of an attribute<T> Optional<T> getFirstValue(String attributeName, Class<T> clazz) Returns the value of the first occurrence of an attributegetName()Return the name of the annotation
- 
Constructor Details- 
PAnnotation
 
- 
- 
Method Details- 
addAttributeAdds an attribute to the annotation- Parameters:
- attributeName-
- value-
 
- 
getNameReturn the name of the annotation
- 
getFirstValueReturns the value of the first occurrence of an attribute- Parameters:
- attributeName-
- Returns:
- the attribute value, or null, if attribute is not available
- Since:
- 2.0
 
- 
getFirstValueReturns the value of the first occurrence of an attribute- Parameters:
- attributeName-
- Returns:
- the attribute value, or null, if attribute is not available
- Since:
- 2.0
 
- 
getAllValuesReturns all values of a selected attribute- Parameters:
- attributeName-
- Returns:
- a non-null, but possibly empty list of attributes
 
- 
forEachValueExecutes a consumer over all attributes. A selected attribute name (key) can appear (and thus consumed) multiple times.- Since:
- 2.0
 
- 
getAllAttributeNamesReturns a set of all attribute names used in this annotation- Since:
- 2.1
 
 
-