Class HtmlSafeAnnotationUtils
java.lang.Object
com.atlassian.confluence.velocity.htmlsafe.HtmlSafeAnnotationUtils
Utilities for working with the
HtmlSafe
annotation-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsAnnotationOfType
(Collection<Annotation> annotations, Class<? extends Annotation> annotationType) Detects whether a collection contains an annotation of a particular typestatic boolean
hasHtmlSafeToStringMethod
(Object value) Return true if the object has a toString method that has been annotated as HtmlSafestatic boolean
isHtmlSafeValue
(com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxedElement value) Determines wheter an annotated value is htmlsafe (i.e should not be encoded during rendering)
-
Field Details
-
HTML_SAFE_ANNOTATION
-
ATLASSIAN_HTML_SAFE_ANNOTATION
-
-
Method Details
-
hasHtmlSafeToStringMethod
Return true if the object has a toString method that has been annotated as HtmlSafe- Parameters:
value
- Object to query- Returns:
- true if HTML safe
-
isHtmlSafeValue
public static boolean isHtmlSafeValue(com.atlassian.velocity.htmlsafe.introspection.AnnotationBoxedElement value) Determines wheter an annotated value is htmlsafe (i.e should not be encoded during rendering)- Parameters:
value
- Object to query- Returns:
- true if HTML safe
-
containsAnnotationOfType
public static boolean containsAnnotationOfType(Collection<Annotation> annotations, Class<? extends Annotation> annotationType) Detects whether a collection contains an annotation of a particular type- Parameters:
annotations
- Collection to scanannotationType
- Annotation type to detect- Returns:
- true if annotation type is found
-