org.mule.devkit.model.code
Class EnumConstant

java.lang.Object
  extended by org.mule.devkit.model.code.AbstractExpression
      extended by org.mule.devkit.model.code.EnumConstant
All Implemented Interfaces:
Annotable, Declaration, Documentable, Generable, GeneratedExpression

public final class EnumConstant
extends AbstractExpression
implements Declaration, Annotable, Documentable

Enum Constant.

When used as an GeneratedExpression, this object represents a reference to the enum constant.

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

Method Summary
 GeneratedAnnotationUse annotate(Class<? extends Annotation> clazz)
          Adds an annotation to this variable.
 GeneratedAnnotationUse annotate(TypeReference clazz)
          Adds an annotation to this variable.
<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()
 EnumConstant arg(GeneratedExpression arg)
          Add an expression to this constructor's argument list
 void declare(Formatter f)
           
 void generate(Formatter f)
           
 String getName()
          Returns the name of this constant.
 GeneratedJavaDocComment javadoc()
          Creates, if necessary, and returns the enum constant javadoc.
 
Methods inherited from class org.mule.devkit.model.code.AbstractExpression
_instanceof, band, bor, cand, complement, component, cor, decr, div, eq, gt, gte, incr, invoke, invoke, isNotNull, isNull, lt, lte, minus, minus, mod, mul, ne, not, plus, ref, ref, shl, shr, shrz, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

arg

public EnumConstant arg(GeneratedExpression arg)
Add an expression to this constructor's argument list

Parameters:
arg - Argument to add to argument list

getName

public String getName()
Returns the name of this constant.

Returns:
never null.

javadoc

public GeneratedJavaDocComment javadoc()
Creates, if necessary, and returns the enum constant javadoc.

Specified by:
javadoc in interface Documentable
Returns:
JDocComment containing javadocs for this constant.

annotate

public GeneratedAnnotationUse annotate(TypeReference clazz)
Adds an annotation to this variable.

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

annotate

public GeneratedAnnotationUse annotate(Class<? extends Annotation> clazz)
Adds an annotation to this variable.

Specified by:
annotate in interface Annotable
Parameters:
clazz - The annotation class to annotate the field 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.

declare

public void declare(Formatter f)
Specified by:
declare in interface Declaration

generate

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


Copyright © 2010-2013 MuleSoft, Inc.. All Rights Reserved.