站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

ClassObjectType (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.base
Class ClassObjectType

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

public class ClassObjectType
extends 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  Field delegate
           
protected  ObjectInstantiator instantiator
           
protected  Class objectTypeClass
          Java object class.
protected  Class shadowClass
           
protected  boolean shadowEnabled
           
protected  ValueType valueType
           
 
Constructor Summary
ClassObjectType(Class objectTypeClass)
          Creates a new class object type with shadow disabled.
ClassObjectType(Class objectTypeClass, Class shadowClass)
          Creates a new class object type with the given class as its shadow class.
 
Method Summary
 boolean equals(Object object)
          Determine if another object is equal to this.
 Class getClassType()
          Return the Java object class.
 Object getShadow(Object fact)
          If shadow facts are enabled, returns the shadow fact, otherwise returns null
 ValueType getValueType()
           
 int hashCode()
           
 boolean isShadowEnabled()
          Returns true in case shadow facts are enabled
 boolean matches(Object object)
          Determine if the passed Object belongs to the object type defined by this objectType instance.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

objectTypeClass

protected Class objectTypeClass
Java object class.


valueType

protected ValueType valueType

shadowEnabled

protected boolean shadowEnabled

shadowClass

protected Class shadowClass

instantiator

protected transient ObjectInstantiator instantiator

delegate

protected transient Field delegate
Constructor Detail

ClassObjectType

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

Parameters:
objectTypeClass - Java object class.

ClassObjectType

public ClassObjectType(Class objectTypeClass,
                       Class shadowClass)
Creates a new class object type with the given class as its shadow class.

Parameters:
objectTypeClass - Java object class.
shadowClass - The shadow class for the given objectTypeClass
Method Detail

getClassType

public Class getClassType()
Return the Java object class.

Returns:
The Java object class.

matches

public boolean matches(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.

getValueType

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

getShadow

public Object getShadow(Object fact)
                 throws RuntimeDroolsException
Description copied from interface: ObjectType
If shadow facts are enabled, returns the shadow fact, otherwise returns null

Specified by:
getShadow in interface ObjectType
Parameters:
fact - the fact to be shadowed
Returns:
the shadow fact for the given fact or null if shadow facts are disabled
Throws:
RuntimeDroolsException

isShadowEnabled

public boolean isShadowEnabled()
Description copied from interface: ObjectType
Returns true in case shadow facts are enabled

Specified by:
isShadowEnabled in interface ObjectType
Returns:
true if shadow facts are enabled, false otherwise

toString

public String toString()
Overrides:
toString in class Object

equals

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

Overrides:
equals in class 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 Object


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.