Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.progeeks.meta.util
Class CompositeMetaKit  view CompositeMetaKit download CompositeMetaKit.java

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

public class CompositeMetaKit
extends java.lang.Object
implements org.progeeks.meta.MetaKit

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

Version:
$Revision: 1.2 $

Nested Class Summary
private static class CompositeMetaKit.CompositeMetaObjectFactory
           
 
Constructor Summary
CompositeMetaKit()
           
 
Method Summary
 java.lang.Object getInternalObject(org.progeeks.meta.MetaObject object)
          Returns the internal object representation for the specified meta-object if one exists.
 org.progeeks.meta.MetaClass getMetaClassForObject(java.lang.Object object)
          Returns the appropriate meta-class for the specified object.
 org.progeeks.meta.MetaClass getMetaClassForObject(java.lang.Object object, org.progeeks.meta.MetaClassRegistry classRegistry)
          Returns the appropriate meta-class for the specified object.
 org.progeeks.meta.MetaObjectFactory getMetaObjectFactory()
          Returns a factory that can be used to create new MetaObject based values using this kit's underlying implementation.
 org.progeeks.meta.MetaObject wrapObject(java.lang.Object object, org.progeeks.meta.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(org.progeeks.meta.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 org.progeeks.meta.MetaKit

getMetaClassForObject

public org.progeeks.meta.MetaClass getMetaClassForObject(java.lang.Object object,
                                                         org.progeeks.meta.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 org.progeeks.meta.MetaKit

getMetaClassForObject

public org.progeeks.meta.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 root class registry.

Specified by:
getMetaClassForObject in interface org.progeeks.meta.MetaKit

wrapObject

public org.progeeks.meta.MetaObject wrapObject(java.lang.Object object,
                                               org.progeeks.meta.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 org.progeeks.meta.MetaKit

getMetaObjectFactory

public org.progeeks.meta.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 org.progeeks.meta.MetaKit