org.mule.devkit.model.code
Class AnnotationArrayMember

java.lang.Object
  extended by org.mule.devkit.model.code.AnnotationValue
      extended by org.mule.devkit.model.code.AnnotationArrayMember
All Implemented Interfaces:
Annotable, Generable

public final class AnnotationArrayMember
extends AnnotationValue
implements Annotable

Represents an arrays as annotation members

This class implements Annotable to allow new annotations to be added as a member of the array.

Author:
Bhakti Mehta (bhakti.mehta@sun.com)

Method Summary
 GeneratedAnnotationUse annotate(Class<? extends Annotation> clazz)
          Adds a new annotation to the array.
 GeneratedAnnotationUse annotate(TypeReference clazz)
          Adds a new annotation to the array.
<W extends AnnotationWriter>
W
annotate2(Class<W> clazz)
          Adds an annotation to this program element and returns a type-safe writer to fill in the values of such annotations.
 Collection<GeneratedAnnotationUse> annotations()
          Annotable.annotations()
 void generate(Formatter f)
           
 AnnotationArrayMember param(boolean value)
          Adds an array member to this annotation
 AnnotationArrayMember param(byte value)
          Adds an array member to this annotation
 AnnotationArrayMember param(char value)
          Adds an array member to this annotation
 AnnotationArrayMember param(Class<?> value)
          Adds a class array member to this annotation
 AnnotationArrayMember param(double value)
          Adds an array member to this annotation
 AnnotationArrayMember param(Enum<?> value)
          Adds a enum array member to this annotation
 AnnotationArrayMember param(EnumConstant value)
          Adds a enum array member to this annotation
 AnnotationArrayMember param(float value)
          Adds an array member to this annotation
 AnnotationArrayMember param(GeneratedAnnotationUse value)
          Deprecated. use annotate(java.lang.Class)
 AnnotationArrayMember param(GeneratedExpression value)
          Adds an expression array member to this annotation
 AnnotationArrayMember param(int value)
          Adds an array member to this annotation
 AnnotationArrayMember param(long value)
          Adds an array member to this annotation
 AnnotationArrayMember param(short value)
          Adds an array member to this annotation
 AnnotationArrayMember param(String value)
          Adds an array member to this annotation
 AnnotationArrayMember param(Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

param

public AnnotationArrayMember param(String value)
Adds an array member to this annotation

Parameters:
value - Adds a string value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(boolean value)
Adds an array member to this annotation

Parameters:
value - Adds a boolean value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(byte value)
Adds an array member to this annotation

Parameters:
value - Adds a byte value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(char value)
Adds an array member to this annotation

Parameters:
value - Adds a char value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(double value)
Adds an array member to this annotation

Parameters:
value - Adds a double value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(long value)
Adds an array member to this annotation

Parameters:
value - Adds a long value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(short value)
Adds an array member to this annotation

Parameters:
value - Adds a short value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(int value)
Adds an array member to this annotation

Parameters:
value - Adds an int value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(float value)
Adds an array member to this annotation

Parameters:
value - Adds a float value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(Enum<?> value)
Adds a enum array member to this annotation

Parameters:
value - Adds a enum value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(EnumConstant value)
Adds a enum array member to this annotation

Parameters:
value - Adds a enum value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(GeneratedExpression value)
Adds an expression array member to this annotation

Parameters:
value - Adds an expression value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(Class<?> value)
Adds a class array member to this annotation

Parameters:
value - Adds a class value to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

param

public AnnotationArrayMember param(Type type)

annotate

public GeneratedAnnotationUse annotate(Class<? extends Annotation> clazz)
Adds a new annotation to the array.

Specified by:
annotate in interface Annotable
Parameters:
clazz - The annotation class to annotate the program element with

annotate

public GeneratedAnnotationUse annotate(TypeReference clazz)
Adds a new annotation to the array.

Specified by:
annotate in interface Annotable
Parameters:
clazz - The annotation class to annotate the program element with

annotate2

public <W extends AnnotationWriter> W annotate2(Class<W> clazz)
Description copied from interface: Annotable
Adds an annotation to this program element and returns a type-safe writer to fill in the values of such annotations.

Specified by:
annotate2 in interface Annotable

annotations

public Collection<GeneratedAnnotationUse> annotations()
Annotable.annotations()

Specified by:
annotations in interface Annotable
Returns:
Can be empty but never null.

param

public AnnotationArrayMember param(GeneratedAnnotationUse value)
Deprecated. use annotate(java.lang.Class)

Adds an annotation member to this annotation array This can be used for e.g @XmlCollection(values= @XmlCollectionItem(type=Foo.class))

Parameters:
value - Adds a annotation to the array member
Returns:
The AnnotationArrayMember. More elements can be added by calling the same method multiple times

generate

public void generate(Formatter f)
Specified by:
generate in interface Generable


Copyright © 2010–2014 MuleSoft, Inc.. All rights reserved.