public final class

HtmlSafeAnnotationUtils

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.velocity.htmlsafe.HtmlSafeAnnotationUtils

Class Overview

Utilities for working with the HtmlSafe annotation

Summary

Fields
public static final Annotation ATLASSIAN_HTML_SAFE_ANNOTATION
public static final Annotation HTML_SAFE_ANNOTATION
Public Methods
static boolean containsAnnotationOfType(Collection<Annotation> annotations, Class<? extends Annotation> annotationType)
Detects whether a collection contains an annotation of a particular type
static boolean hasHtmlSafeToStringMethod(Object value)
Return true if the object has a toString method that has been annotated as HtmlSafe
static boolean isHtmlSafeValue(AnnotationBoxedElement value)
Determines wheter an annotated value is htmlsafe (i.e should not be encoded during rendering)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final Annotation ATLASSIAN_HTML_SAFE_ANNOTATION

public static final Annotation HTML_SAFE_ANNOTATION

Public Methods

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 scan
annotationType Annotation type to detect
Returns
  • true if annotation type is found

public static boolean hasHtmlSafeToStringMethod (Object value)

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

public static boolean isHtmlSafeValue (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