org.apache.tomcat.util.bcel.classfile
Class Constant
java.lang.Object
org.apache.tomcat.util.bcel.classfile.Constant
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- ConstantClass, ConstantCP, ConstantDouble, ConstantFloat, ConstantInteger, ConstantInvokeDynamic, ConstantLong, ConstantMethodHandle, ConstantMethodType, ConstantNameAndType, ConstantString, ConstantUtf8
public abstract class Constant
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable
Abstract superclass for classes to represent the different constant types
in the constant pool of a class file. The classes keep closely to
the JVM specification.
- Version:
- $Id: Constant.java 1377534 2012-08-26 22:26:10Z markt $
- Author:
- M. Dahm
- See Also:
- Serialized Form
Field Summary |
protected byte |
tag
|
Method Summary |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Return value as defined by given BCELComparator strategy. |
byte |
getTag()
|
int |
hashCode()
Return value as defined by given BCELComparator strategy. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
tag
protected byte tag
getTag
public final byte getTag()
- Returns:
- Tag of constant, i.e., its type. No setTag() method to avoid
confusion.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- String representation.
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
equals
public boolean equals(java.lang.Object obj)
- Return value as defined by given BCELComparator strategy.
By default two Constant objects are said to be equal when
the result of toString() is equal.
- Overrides:
equals
in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- Return value as defined by given BCELComparator strategy.
By default return the hashcode of the result of toString().
- Overrides:
hashCode
in class java.lang.Object
- See Also:
Object.hashCode()
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.