org.jboss.reflect.plugins
Class EnumConstantInfoImpl

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

public class EnumConstantInfoImpl
extends org.jboss.util.JBossObject
implements EnumConstantInfo, Serializable

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.util.JBossObject
hashCode, log, toString
 
Constructor Summary
EnumConstantInfoImpl()
          Create a new constant
EnumConstantInfoImpl(String name, EnumInfo declaring)
          Create a new constant
 
Method Summary
protected  void calculateHash()
          Calculate the hash code
 boolean equals(Object o)
           
 EnumInfo getDeclaring()
          Get the declaring enumeration
 String getName()
          Get the name
 int hashCode()
           
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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
Method Detail

getName

public String getName()
Get the name

Specified by:
getName in interface EnumConstantInfo
Returns:
the name

getDeclaring

public EnumInfo getDeclaring()
Get the declaring enumeration

Specified by:
getDeclaring in interface EnumConstantInfo
Returns:
the enumeration

equals

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

hashCode

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

calculateHash

protected void calculateHash()
Calculate the hash code



Copyright © 2004 JBoss Inc. All Rights Reserved.