org.progeeks.meta.util
Class CompositeMetaKit

java.lang.Object
  extended by org.progeeks.meta.util.CompositeMetaKit
All Implemented Interfaces:
MetaKit

public class CompositeMetaKit
extends java.lang.Object
implements MetaKit

MetaKit implementation combining one or more other meta-kit implementations to support compositing meta-objects.

Version:
$Revision: 1.5 $
Author:
Paul Speed

Constructor Summary
CompositeMetaKit()
           
 
Method Summary
 java.lang.Object getInternalObject(MetaObject object)
          Returns the internal object representation for the specified meta-object if one exists.
 MetaClass getMetaClassForObject(java.lang.Object object)
          Returns the appropriate meta-class for the specified object.
 MetaClass getMetaClassForObject(java.lang.Object object, MetaClassRegistry classRegistry)
          Returns the appropriate meta-class for the specified object.
 MetaObjectFactory getMetaObjectFactory()
          Returns a factory that can be used to create new MetaObject based values using this kit's underlying implementation.
 MetaObject wrapObject(java.lang.Object object, MetaClass mClass)
          Wraps the specified object in a meta-object adapter specific to this kit's implementation layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeMetaKit

public CompositeMetaKit()
Method Detail

getInternalObject

public java.lang.Object getInternalObject(MetaObject object)
Returns the internal object representation for the specified meta-object if one exists. For meta-object implementations that wrap an internal object, this will return the internal object. null is returned if the meta-object implementation does not internally wrap real objects.

Specified by:
getInternalObject in interface MetaKit

getMetaClassForObject

public MetaClass getMetaClassForObject(java.lang.Object object,
                                       MetaClassRegistry classRegistry)
Returns the appropriate meta-class for the specified object. If an appropriate meta-class has not been registered then this method returns null.

Specified by:
getMetaClassForObject in interface MetaKit

getMetaClassForObject

public MetaClass getMetaClassForObject(java.lang.Object object)
Returns the appropriate meta-class for the specified object. If an appropriate meta-class has not been registered then this method returns null. The meta-class is looked up in the context class registry.

Specified by:
getMetaClassForObject in interface MetaKit

wrapObject

public MetaObject wrapObject(java.lang.Object object,
                             MetaClass mClass)
Wraps the specified object in a meta-object adapter specific to this kit's implementation layer. Returns null if the object cannot be wrapped. Throws UnsupportedOperationException if this kit doesn't support wrapping.

Specified by:
wrapObject in interface MetaKit

getMetaObjectFactory

public MetaObjectFactory getMetaObjectFactory()
Returns a factory that can be used to create new MetaObject based values using this kit's underlying implementation.

Specified by:
getMetaObjectFactory in interface MetaKit


Copyright © 2002-2003 Paul Speed. All Rights Reserved.