* The working memory session.
*/
public void assertObject(final InternalFactHandle handle,
final PropagationContext context,
final InternalWorkingMemory workingMemory) {
final ObjectHashMap memory = (ObjectHashMap) workingMemory.getNodeMemory( this );
Object object = handle.getObject();
ObjectTypeConf ojectTypeConf;
if ( object instanceof FactImpl ) {
String key = ((Fact) object).getFactTemplate().getName();
ojectTypeConf = (ObjectTypeConf) memory.get( key );
if ( ojectTypeConf == null ) {
ojectTypeConf = new FactTemplateTypeConf( ((Fact) object).getFactTemplate(),
this.ruleBase );
memory.put( key,
ojectTypeConf,
false );
}
object = key;
} else {
Class cls = null;
if ( object instanceof ShadowProxy ) {
cls = ((ShadowProxy) object).getShadowedObject().getClass();
} else {
cls = object.getClass();
}
ojectTypeConf = (ObjectTypeConf) memory.get( cls );
if ( ojectTypeConf == null ) {
ojectTypeConf = new ClassObjectTypeConf( cls,
this.ruleBase );
memory.put( cls,
ojectTypeConf,
false );
}
// checks if shadow is enabled