org.codehaus.aspectwerkz.annotation
Class AnnotationElement

java.lang.Object
  extended by org.codehaus.aspectwerkz.annotation.AnnotationElement
All Implemented Interfaces:
Serializable

public class AnnotationElement
extends Object
implements Serializable

A structure for an Annotation element It wraps value behind an holder. The holder is the object itself (boxed) excepted for Class, for which it is a LazyClass.

Author:
Alexandre Vasseur
See Also:
Serialized Form

Nested Class Summary
static class AnnotationElement.LazyClass
          A wrapper for a className, that will allow late loading of the actual Class object of an annotation value For array type, className is componentClassName([])*
 
Field Summary
protected  boolean isLazyClass
          true if we have a lasy class (optimization to avoid instance of at each get)
protected  boolean isLazyClassArray
          true if we have a lasy class array (N-dim) (optimization to avoid instance of at each get)
 
Constructor Summary
AnnotationElement(String name, Object valueHolder)
          Build a new annotation element
 
Method Summary
 Object resolveValueHolderFrom(ClassLoader loader)
          Returns the actual holded element value
 String toString()
          Returns a string representation of the annotation element value Note that such a represention won't look like source code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isLazyClass

protected boolean isLazyClass
true if we have a lasy class (optimization to avoid instance of at each get)


isLazyClassArray

protected boolean isLazyClassArray
true if we have a lasy class array (N-dim) (optimization to avoid instance of at each get)

Constructor Detail

AnnotationElement

public AnnotationElement(String name,
                         Object valueHolder)
Build a new annotation element

Parameters:
name -
valueHolder -
Method Detail

resolveValueHolderFrom

public Object resolveValueHolderFrom(ClassLoader loader)
Returns the actual holded element value

Parameters:
loader - from which to resolve LazyClass. It should be the annotated element class loader
Returns:

toString

public String toString()
Returns a string representation of the annotation element value Note that such a represention won't look like source code. (f.e. element String s() will not have quotes and escapes etc).

Overrides:
toString in class Object
Returns:


Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.