org.drools.base
Class ClassObjectType

java.lang.Object
  extended by org.drools.base.ClassObjectType
All Implemented Interfaces:
java.io.Serializable, ObjectType

public class ClassObjectType
extends java.lang.Object
implements ObjectType

Java class semantics ObjectType.

Version:
$Id: ClassObjectType.java,v 1.5 2005/02/04 02:13:36 mproctor Exp $
Author:
bob@werken.com
See Also:
Serialized Form

Field Summary
protected  java.lang.Class objectTypeClass
          Java object class.
protected  ValueType valueType
           
 
Constructor Summary
ClassObjectType(java.lang.Class objectTypeClass)
          Creates a new class object type with shadow disabled.
 
Method Summary
 boolean equals(java.lang.Object object)
          Determine if another object is equal to this.
 java.lang.Class getClassType()
          Return the Java object class.
 ValueType getValueType()
           
 int hashCode()
           
 boolean isAssignableFrom(java.lang.Object object)
           
 boolean isAssignableFrom(ObjectType objectType)
           
 boolean matches(java.lang.Object object)
          Determine if the passed Object belongs to the object type defined by this objectType instance.
 boolean matchesClass(java.lang.Class clazz)
          Determine if the passed Class matches to the object type defined by this objectType instance.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

objectTypeClass

protected java.lang.Class objectTypeClass
Java object class.


valueType

protected ValueType valueType
Constructor Detail

ClassObjectType

public ClassObjectType(java.lang.Class objectTypeClass)
Creates a new class object type with shadow disabled.

Parameters:
objectTypeClass - Java object class.
Method Detail

getClassType

public java.lang.Class getClassType()
Return the Java object class.

Returns:
The Java object class.

matchesClass

public boolean matchesClass(java.lang.Class clazz)
Determine if the passed Class matches to the object type defined by this objectType instance.

Parameters:
clazz - The Class to test.
Returns:
true if the Class matches this object type, else false.

matches

public boolean matches(java.lang.Object object)
Determine if the passed Object belongs to the object type defined by this objectType instance.

Specified by:
matches in interface ObjectType
Parameters:
object - The Object to test.
Returns:
true if the Object matches this object type, else false.

isAssignableFrom

public boolean isAssignableFrom(java.lang.Object object)
Specified by:
isAssignableFrom in interface ObjectType

isAssignableFrom

public boolean isAssignableFrom(ObjectType objectType)
Specified by:
isAssignableFrom in interface ObjectType

getValueType

public ValueType getValueType()
Specified by:
getValueType in interface ObjectType

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Determine if another object is equal to this.

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to test.
Returns:
true if object is equal to this, otherwise false.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object