gnu.beanfactory
Interface BeanDefinition

All Known Implementing Classes:
BeanDefinitionImpl

public interface BeanDefinition

Defines the URL, class name, scope and initial properties for a bean. All beans managed by the BeanFactory container must be defined by an implementation of this interface. This interface is exposed through the DefinitionLoader interface.

Normal use of the BeanFactory framework should not involve direct interaction with this class.

Version:
$Id: BeanDefinition.java,v 1.42 2002/04/22 04:21:08 rschoening Exp $
Author:
Rob Schoening <rob@beanfactory.net>
See Also:
DefinitionLoader

Method Summary
 BeanSetter getBeanSetter()
          Obtains a BeanSetter instance for the current bean.
 java.lang.String getClassName()
          Obtains the fully qualified class name for this definition.
 java.lang.Class getClazz()
          Get the class definition for this bean.
 java.lang.String getDelimiter()
           
 java.lang.String getName()
          Obtains the URL for this definition.
 java.lang.String getParent()
          Obtains the URL of this definition's "parent".
 java.util.Set getPropertyNames()
          Returns a set of initialized property names.
 java.lang.String getPropertyValue(java.lang.String name)
          Obtains the String value for a particular property.
 int getScopeCode()
          Obtains the int code for this definition's scope.
 java.lang.String getScopeName()
          Obtains the name of this definition's defined scope.
 boolean getStartup()
          Boolean flag indicating whether this bean will be loaded when the BeanFactory container is initialzied.
 java.lang.String getURL()
          Obtains the URL for this definition.
 boolean isScopeExplicit()
          Returns true if the scope has been explicitly set.
 boolean isScopeJ2EE()
          Returns true if the scope is: application, session, or request.
 boolean isValid()
          Returns true if this BeanDefinition has been validated.
 

Method Detail

isValid

public boolean isValid()
Returns true if this BeanDefinition has been validated.

getPropertyNames

public java.util.Set getPropertyNames()
Returns a set of initialized property names. This is not a complete list of properties for the bean.
Returns:
java.util.Set containing property names to be initialized

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String name)
Obtains the String value for a particular property. Will return null if the property does not exist or is null.

getDelimiter

public java.lang.String getDelimiter()

getName

public java.lang.String getName()
Obtains the URL for this definition.

getURL

public java.lang.String getURL()
Obtains the URL for this definition.

getScopeCode

public int getScopeCode()
Obtains the int code for this definition's scope. Valid values are defined as static members of gnu.beanfactory.BeanContext.
See Also:
BeanContext

getScopeName

public java.lang.String getScopeName()
Obtains the name of this definition's defined scope. Valid values are defined as static members of gnu.beanfactory.BeanContext.
See Also:
BeanContext

getClassName

public java.lang.String getClassName()
Obtains the fully qualified class name for this definition.
Returns:
fully qualified class name

getClazz

public java.lang.Class getClazz()
                         throws java.lang.ClassNotFoundException
Get the class definition for this bean.

getBeanSetter

public BeanSetter getBeanSetter()
                         throws java.lang.ClassNotFoundException,
                                BeanFactoryException
Obtains a BeanSetter instance for the current bean.
Returns:
BeanSetter instance

isScopeExplicit

public boolean isScopeExplicit()
Returns true if the scope has been explicitly set.

getParent

public java.lang.String getParent()
Obtains the URL of this definition's "parent". This may be be null, indicating that this bean does not inherit any attributes.
Returns:
URL of the parent definition, or null if there is no parent

getStartup

public boolean getStartup()
Boolean flag indicating whether this bean will be loaded when the BeanFactory container is initialzied.

isScopeJ2EE

public boolean isScopeJ2EE()
Returns true if the scope is: application, session, or request.