org.favabeans.base
Class SimpleFacetFactory

java.lang.Object
  |
  +--org.favabeans.base.SimpleFacetFactory
All Implemented Interfaces:
FacetFactory

public class SimpleFacetFactory
extends Object
implements FacetFactory

A convenience implementation of FacetFactory for Facet classes that have a constructor --

facetClass(Object primaryObject)


Constructor Summary
SimpleFacetFactory(Class facetClass)
          Create a new SimpleFacetFactory.
 
Method Summary
 Facet newFacet(Object primaryObject, Type primaryObjectType, Type facetType)
          Create a new Facet for a given primary object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFacetFactory

public SimpleFacetFactory(Class facetClass)
Create a new SimpleFacetFactory.
Parameters:
facetClass - the class implementing the Facet; this class must have a constructor as noted above.
Method Detail

newFacet

public Facet newFacet(Object primaryObject,
                      Type primaryObjectType,
                      Type facetType)
               throws FactoryException
Description copied from interface: FacetFactory
Create a new Facet for a given primary object.
Specified by:
newFacet in interface FacetFactory
Following copied from interface: org.favabeans.base.FacetFactory
Parameters:
primaryObject - the primary object for the Facet to be created.
primaryObjectType - the Type of the primary object, as determined by the caller of this method.
facetType - the returned Facet is required to be an instance of this Type.
Returns:
a new Facet
Throws:
FactoryException - if the Facet could not be constructed.


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.