org.apache.commons.clazz.bean
Class BeanClazz

java.lang.Object
  extended byorg.apache.commons.clazz.common.ClazzElementSupport
      extended byorg.apache.commons.clazz.Clazz
          extended byorg.apache.commons.clazz.bean.BeanClazz
All Implemented Interfaces:
org.apache.commons.clazz.ClazzElement

public class BeanClazz
extends org.apache.commons.clazz.Clazz

Dynamically constructed Clazz. BeanClazzes are created by invoking clazzLoader.defineClazz (name, clazzClass, instanceClass).

Version:
$Id: BeanClazz.java,v 1.5 2004/02/19 23:58:38 scolebourne Exp $
Author:
Stephen Colebourne, Dmitri Plotnikov

Field Summary
 
Fields inherited from class org.apache.commons.clazz.Clazz
EXTENDED_CLAZZ_MODEL, STANDARD_CLAZZ_MODEL
 
Constructor Summary
BeanClazz(org.apache.commons.clazz.ClazzLoader loader, String name, Class instanceClass)
          Constructor for BeanClazz.
 
Method Summary
 void addDeclaredOperation(org.apache.commons.clazz.ClazzOperation operation)
           
 void addDeclaredProperty(org.apache.commons.clazz.ClazzProperty property)
           
 void addInstanceFactory(org.apache.commons.clazz.ClazzInstanceFactory factory)
           
protected  void addOperation(org.apache.commons.clazz.ClazzOperation operation)
          Called indirectly when declared operations are manipulated.
protected  void addProperty(org.apache.commons.clazz.ClazzProperty property)
          Called indirectly when declared properties are manipulated.
 List getDeclaredOperations()
          Returns all Operations declared by this clazz, not its superclazzes.
 List getDeclaredProperties()
          Returns properties declared by this Clazz, not its superclazzes
 Class getInstanceClass()
          Returns the class of instances created by the newInstance() method.
 List getInstanceFactories()
          Returns all InstanceFactories for this clazz.
 org.apache.commons.clazz.ClazzInstanceFactory getInstanceFactory(String signature)
          Returns ClazzInstanceFactory for the given signature.
 org.apache.commons.clazz.ClazzOperation getOperation(String signature)
          Returns the Operation for the given signature.
 List getOperations()
          Returns all Operations for this clazz.
 List getProperties()
          Returns all properties for this clazz, including those declared by superclazzes.
 org.apache.commons.clazz.ClazzProperty getProperty(String name)
          Returns a ClazzProperty for the given name
 org.apache.commons.clazz.Clazz getSuperclazz()
          Returns the superclazz for this Clazz, or null if there is none.
protected  void refreshAllCaches()
           
protected  void refreshOperationCache()
           
protected  void refreshPropertyCache()
           
 void removeDeclaredOperation(org.apache.commons.clazz.ClazzOperation operation)
           
 void removeDeclaredProperty(org.apache.commons.clazz.ClazzProperty property)
           
 void removeInstanceFactory(org.apache.commons.clazz.ClazzInstanceFactory factory)
           
protected  void removeOperation(org.apache.commons.clazz.ClazzOperation operation)
          Called indirectly when declared operations are manipulated.
protected  void removeProperty(org.apache.commons.clazz.ClazzProperty property)
          Called indirectly when declared properties are manipulated.
 void setSuperclazz(org.apache.commons.clazz.Clazz clazz)
           
 
Methods inherited from class org.apache.commons.clazz.Clazz
addClazzChangeListener, addClazzLoaderFactory, constructSignature, constructSignature, fireInstanceFactoryAdded, fireInstanceFactoryRemoved, fireOperationAdded, fireOperationRemoved, firePropertyAdded, firePropertyRemoved, getCanonicalClassName, getClazz, getClazz, getClazzLoader, getClazzLoader, getClazzLoaderFactory, getDefaultClazzLoader, getDefaultClazzModel, getName, getPackageName, getShortClassName, isAssignableFrom, newInstance, newInstance, removeClazzChangeListener, setDefaultClazzModel
 
Methods inherited from class org.apache.commons.clazz.common.ClazzElementSupport
getAttribute, getAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.clazz.ClazzElement
getAttribute, getAttributes
 

Constructor Detail

BeanClazz

public BeanClazz(org.apache.commons.clazz.ClazzLoader loader,
                 String name,
                 Class instanceClass)
Constructor for BeanClazz.

Parameters:
loader -
name -
instanceClass -
Method Detail

getInstanceClass

public Class getInstanceClass()
Description copied from class: org.apache.commons.clazz.Clazz
Returns the class of instances created by the newInstance() method.


getSuperclazz

public org.apache.commons.clazz.Clazz getSuperclazz()
Description copied from class: org.apache.commons.clazz.Clazz
Returns the superclazz for this Clazz, or null if there is none.

See Also:
Clazz.getSuperclazz()

setSuperclazz

public void setSuperclazz(org.apache.commons.clazz.Clazz clazz)

refreshAllCaches

protected void refreshAllCaches()

refreshPropertyCache

protected void refreshPropertyCache()

refreshOperationCache

protected void refreshOperationCache()

getDeclaredProperties

public List getDeclaredProperties()
Description copied from class: org.apache.commons.clazz.Clazz
Returns properties declared by this Clazz, not its superclazzes

See Also:
Clazz.getDeclaredProperties()

addDeclaredProperty

public void addDeclaredProperty(org.apache.commons.clazz.ClazzProperty property)

addProperty

protected void addProperty(org.apache.commons.clazz.ClazzProperty property)
Called indirectly when declared properties are manipulated.


removeDeclaredProperty

public void removeDeclaredProperty(org.apache.commons.clazz.ClazzProperty property)

removeProperty

protected void removeProperty(org.apache.commons.clazz.ClazzProperty property)
Called indirectly when declared properties are manipulated.


getProperties

public List getProperties()
Description copied from class: org.apache.commons.clazz.Clazz
Returns all properties for this clazz, including those declared by superclazzes.

See Also:
Clazz.getProperties()

getProperty

public org.apache.commons.clazz.ClazzProperty getProperty(String name)
Description copied from class: org.apache.commons.clazz.Clazz
Returns a ClazzProperty for the given name

See Also:
Clazz.getProperty(java.lang.String)

getDeclaredOperations

public List getDeclaredOperations()
Description copied from class: org.apache.commons.clazz.Clazz
Returns all Operations declared by this clazz, not its superclazzes.

See Also:
Clazz.getDeclaredOperations()

addDeclaredOperation

public void addDeclaredOperation(org.apache.commons.clazz.ClazzOperation operation)

addOperation

protected void addOperation(org.apache.commons.clazz.ClazzOperation operation)
Called indirectly when declared operations are manipulated.


removeDeclaredOperation

public void removeDeclaredOperation(org.apache.commons.clazz.ClazzOperation operation)

removeOperation

protected void removeOperation(org.apache.commons.clazz.ClazzOperation operation)
Called indirectly when declared operations are manipulated.


getOperations

public List getOperations()
Description copied from class: org.apache.commons.clazz.Clazz
Returns all Operations for this clazz.

See Also:
Clazz.getOperations()

getOperation

public org.apache.commons.clazz.ClazzOperation getOperation(String signature)
Description copied from class: org.apache.commons.clazz.Clazz
Returns the Operation for the given signature. The signature should be formatted as follows: "name(paramClazzName1,...)"

See Also:
Clazz.getOperation(java.lang.String)

getInstanceFactories

public List getInstanceFactories()
Description copied from class: org.apache.commons.clazz.Clazz
Returns all InstanceFactories for this clazz.

See Also:
Clazz.getInstanceFactories()

getInstanceFactory

public org.apache.commons.clazz.ClazzInstanceFactory getInstanceFactory(String signature)
Description copied from class: org.apache.commons.clazz.Clazz
Returns ClazzInstanceFactory for the given signature. The signature should be formatted as follows: "(paramClazzName1,...)". You can pass null in place of "()".

See Also:
Clazz.getInstanceFactory(java.lang.String)

addInstanceFactory

public void addInstanceFactory(org.apache.commons.clazz.ClazzInstanceFactory factory)

removeInstanceFactory

public void removeInstanceFactory(org.apache.commons.clazz.ClazzInstanceFactory factory)


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.