public final class

AnnotatedValue

extends Object
implements AnnotationBoxedElement
java.lang.Object
   ↳ com.atlassian.confluence.velocity.introspection.AnnotatedValue

Class Overview

An annotated value associates a collection of annotations with a value.

Summary

Public Constructors
AnnotatedValue(Object value, Collection<Annotation> annotations)
Construct a new annotated value.
Public Methods
Object box(Object value)
This will box another object with the same annotations as this value.
boolean equals(Object o)
<T extends Annotation> T getAnnotation(Class<T> tClass)
Annotation[] getAnnotations()
Collection<Annotation> getCollectionInheritableAnnotations()
Annotation[] getDeclaredAnnotations()
final String getDescription()
int hashCode()
boolean isAnnotationPresent(Class<? extends Annotation> aClass)
String toString()
Delegates and returns the result of calling toString on the boxed value.
Object unbox()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.velocity.introspection.BoxedValue
From interface com.atlassian.confluence.velocity.introspection.BoxingStrategy
From interface java.lang.reflect.AnnotatedElement

Public Constructors

public AnnotatedValue (Object value, Collection<Annotation> annotations)

Construct a new annotated value. THe iteration order of annotations may not be preserved.

Parameters
value The value to annotate
annotations This values annotations.

Public Methods

public Object box (Object value)

This will box another object with the same annotations as this value.

Parameters
value Value to box
Returns
  • Value boxed with the annotations

public boolean equals (Object o)

public T getAnnotation (Class<T> tClass)

public Annotation[] getAnnotations ()

public Collection<Annotation> getCollectionInheritableAnnotations ()

public Annotation[] getDeclaredAnnotations ()

public final String getDescription ()

public int hashCode ()

public boolean isAnnotationPresent (Class<? extends Annotation> aClass)

public String toString ()

Delegates and returns the result of calling toString on the boxed value. This is unpleasant but necessary as Velocity uses the toString() result when context values are used as part of directive arguments.

Returns
  • String representation of wrapped value

public Object unbox ()