JBoss Reflection 2.2.1.SP1

org.jboss.reflect.plugins
Class EnumConstantInfoImpl

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.AbstractAnnotatedInfo
          extended by org.jboss.reflect.plugins.AnnotationHolder
              extended by org.jboss.reflect.plugins.EnumConstantInfoImpl
All Implemented Interfaces:
Serializable, Cloneable, AnnotatedInfo, EnumConstantInfo, org.jboss.util.JBossInterface

public class EnumConstantInfoImpl
extends AnnotationHolder
implements EnumConstantInfo

An enumeration constant

Author:
Bill Burke, Adrian Brock
See Also:
Serialized Form

Field Summary
protected  EnumInfo declaring
          The enumeration
protected  int hash
          The hash code
protected  String name
          The constant name
 
Fields inherited from class org.jboss.reflect.plugins.AnnotationHolder
annotationMap, annotationsArray
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
EnumConstantInfoImpl()
          Create a new constant
EnumConstantInfoImpl(String name, EnumInfo declaring)
          Create a new constant
EnumConstantInfoImpl(String name, EnumInfo declaring, AnnotationValue[] annotations)
          Create a new constant
 
Method Summary
 boolean equals(Object o)
           
 EnumInfo getDeclaring()
          Get the declaring enumeration
 int getHashCode()
           
 String getName()
          Get the name
 Object getValue()
          Get the value
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
protected  void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.reflect.plugins.AnnotationHolder
getAnnotation, getAnnotations, isAnnotationPresent, setupAnnotations
 
Methods inherited from class org.jboss.reflect.plugins.AbstractAnnotatedInfo
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.reflect.spi.AnnotatedInfo
getAnnotation, getAnnotations, getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent, isAnnotationPresent
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString
 

Field Detail

name

protected String name
The constant name


declaring

protected EnumInfo declaring
The enumeration


hash

protected int hash
The hash code

Constructor Detail

EnumConstantInfoImpl

public EnumConstantInfoImpl()
Create a new constant


EnumConstantInfoImpl

public EnumConstantInfoImpl(String name,
                            EnumInfo declaring)
Create a new constant

Parameters:
name - the name
declaring - the enumeration

EnumConstantInfoImpl

public EnumConstantInfoImpl(String name,
                            EnumInfo declaring,
                            AnnotationValue[] annotations)
Create a new constant

Parameters:
name - the name
declaring - the enumeration
annotations - the annotations
Method Detail

getName

public String getName()
Description copied from interface: EnumConstantInfo
Get the name

Specified by:
getName in interface EnumConstantInfo
Returns:
the name

getDeclaring

public EnumInfo getDeclaring()
Description copied from interface: EnumConstantInfo
Get the declaring enumeration

Specified by:
getDeclaring in interface EnumConstantInfo
Returns:
the enumeration

getValue

public Object getValue()
Description copied from interface: EnumConstantInfo
Get the value

Specified by:
getValue in interface EnumConstantInfo
Returns:
the value

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getHashCode

public int getHashCode()
Overrides:
getHashCode in class org.jboss.util.JBossObject

toShortString

public void toShortString(org.jboss.util.JBossStringBuilder buffer)
Specified by:
toShortString in interface org.jboss.util.JBossInterface
Overrides:
toShortString in class org.jboss.util.JBossObject

toString

protected void toString(org.jboss.util.JBossStringBuilder buffer)
Overrides:
toString in class org.jboss.util.JBossObject

JBoss Reflection 2.2.1.SP1

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.