com.atlassian.velocity.htmlsafe.introspection
Class ToStringDelegatingAnnotationBoxedElement<E>

java.lang.Object
  extended by com.atlassian.velocity.htmlsafe.introspection.ToStringDelegatingAnnotationBoxedElement<E>
All Implemented Interfaces:
AnnotationBoxedElement<E>, BoxedValue<E>, BoxingStrategy, AnnotatedElement

public final class ToStringDelegatingAnnotationBoxedElement<E>
extends Object
implements AnnotationBoxedElement<E>

AnnotationBoxedElement that delegates all operations to the wrapped element except for toString() which is delegated to the boxed value itself.


Constructor Summary
ToStringDelegatingAnnotationBoxedElement(AnnotationBoxedElement<E> delegate)
           
 
Method Summary
 Object box(Object value)
          Box the provided value according to the boxing strategy
<T extends Annotation>
T
getAnnotation(Class<T> annotationType)
           
 Collection<Annotation> getAnnotationCollection()
           
 Annotation[] getAnnotations()
           
 Annotation[] getDeclaredAnnotations()
           
<T extends Annotation>
boolean
hasAnnotation(Class<T> clazz)
           
 boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
           
 String toString()
           
 E unbox()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToStringDelegatingAnnotationBoxedElement

public ToStringDelegatingAnnotationBoxedElement(AnnotationBoxedElement<E> delegate)
Method Detail

unbox

public E unbox()
Specified by:
unbox in interface BoxedValue<E>

isAnnotationPresent

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Specified by:
isAnnotationPresent in interface AnnotatedElement

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotationType)
Specified by:
getAnnotation in interface AnnotatedElement

getAnnotations

public Annotation[] getAnnotations()
Specified by:
getAnnotations in interface AnnotatedElement

getDeclaredAnnotations

public Annotation[] getDeclaredAnnotations()
Specified by:
getDeclaredAnnotations in interface AnnotatedElement

getAnnotationCollection

public Collection<Annotation> getAnnotationCollection()
Specified by:
getAnnotationCollection in interface AnnotationBoxedElement<E>

hasAnnotation

public <T extends Annotation> boolean hasAnnotation(Class<T> clazz)
Specified by:
hasAnnotation in interface AnnotationBoxedElement<E>

box

public Object box(Object value)
Description copied from interface: BoxingStrategy
Box the provided value according to the boxing strategy

Specified by:
box in interface BoxingStrategy
Parameters:
value - object to box
Returns:
value boxed according to this strategy

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Atlassian. All Rights Reserved.