com.metamatrix.common.actions
Class ClassDefinition

java.lang.Object
  extended by com.metamatrix.common.actions.ClassDefinition
All Implemented Interfaces:
java.lang.Comparable

public class ClassDefinition
extends java.lang.Object
implements java.lang.Comparable


Constructor Summary
ClassDefinition(java.lang.Class c)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares this object to another.
 boolean equals(java.lang.Object obj)
          Returns true if the specified object is semantically equal to this instance.
 java.lang.String getClassName()
           
 java.lang.Class getClassObject()
           
 java.lang.String getFullName()
           
 java.lang.String getPackageName()
           
 int hashCode()
          Overrides Object hashCode method.
 java.lang.String toString()
          Returns a string representing the current state of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassDefinition

public ClassDefinition(java.lang.Class c)
Method Detail

getFullName

public java.lang.String getFullName()

getClassName

public java.lang.String getClassName()

getPackageName

public java.lang.String getPackageName()

getClassObject

public java.lang.Class getClassObject()

toString

public java.lang.String toString()
Returns a string representing the current state of the object.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this instance.

compareTo

public int compareTo(java.lang.Object obj)
Compares this object to another. If the specified object is an instance of the same class, then this method compares the name; otherwise, it throws a ClassCastException (as instances are comparable only to instances of the same class). Note: this method is consistent with equals().

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - the object that this instance is to be compared to.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object, respectively.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this instance.

equals

public boolean equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. Note: this method is consistent with compareTo().

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object that this instance is to be compared to.
Returns:
whether the object is equal to this object.

hashCode

public int hashCode()
Overrides Object hashCode method. Note that the hash code is computed purely from the ID, so two distinct instances that have the same identifier (i.e., full name) will have the same hash code value.

This hash code must be consistent with the equals method. defined by subclasses.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code value for this metadata object.


Copyright © 2009. All Rights Reserved.