com.lonniepryor.blues.xml
Class XmlBeanHelper

java.lang.Object
  |
  +--com.lonniepryor.blues.util.BeanHelper
        |
        +--com.lonniepryor.blues.xml.XmlBeanHelper

public class XmlBeanHelper
extends BeanHelper

Helper class that extends normal JavaBean semantics with the Blues Xml XmlParser patterns.

Version:
$Revision: 1.1 $
Author:
Lonnie Pryor

Constructor Summary
XmlBeanHelper(java.lang.Class beanType)
          Creates a new XmlBeanHelper object.
 
Method Summary
 boolean declareLocalElement(java.lang.Object instance, java.lang.String localDeclarationName, java.lang.Object childElement)
          Declares a local element with the supplied name on the specified instance.
 boolean declarePrefixedElement(java.lang.Object instance, java.lang.Object childElement)
          Declares a prefixed element on the specified instance.
 java.lang.reflect.Method getLocalDeclarationMutator(java.lang.String localDeclarationName)
          Returns the mutator method for the named local declaration, or null if one is not found.
 java.util.Set getLocalDeclarationNames()
          Returns the names of all of the local declarations the bean type exposes.
 java.lang.Class getLocalDeclarationType(java.lang.String localDeclarationName)
          Returns the type of the named local declaration, or null if one is not found.
 java.lang.reflect.Method getPrefixedDeclarationMutator(java.lang.Class childElementType)
          Returns the mutator method for the prefixed declaration registered for the specified child element type, or null if one is not found.
 java.util.Set getPrefixedDeclarationTypes()
          Returns the types of all of the prefixed declarations the bean type exposes.
 
Methods inherited from class com.lonniepryor.blues.util.BeanHelper
activateCache, canWriteStringsTo, clearProperty, deactivateCache, equals, getBeanType, getProperty, getPropertyAccessor, getPropertyMutator, getPropertyNames, getPropertyType, hashCode, introspect, invoke, newBeanInstance, setProperty, setPropertyAsString, stringToValue, toPropertyName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlBeanHelper

public XmlBeanHelper(java.lang.Class beanType)
Creates a new XmlBeanHelper object.

Parameters:
beanType - The type of the xml bean.
Method Detail

getLocalDeclarationNames

public java.util.Set getLocalDeclarationNames()
Returns the names of all of the local declarations the bean type exposes.

Returns:
The names of all of the local declarations the bean type exposes.

getPrefixedDeclarationTypes

public java.util.Set getPrefixedDeclarationTypes()
Returns the types of all of the prefixed declarations the bean type exposes.

Returns:
The types of all of the prefixed declarations the bean type exposes.

getLocalDeclarationMutator

public java.lang.reflect.Method getLocalDeclarationMutator(java.lang.String localDeclarationName)
Returns the mutator method for the named local declaration, or null if one is not found.

Parameters:
localDeclarationName - The name of the local declaration.
Returns:
The mutator method for the named local declaration, or null if one is not found.

getPrefixedDeclarationMutator

public java.lang.reflect.Method getPrefixedDeclarationMutator(java.lang.Class childElementType)
Returns the mutator method for the prefixed declaration registered for the specified child element type, or null if one is not found.

Parameters:
childElementType - The type of child element to find a mutator for.
Returns:
The mutator method for the prefixed declaration registered for the specified child element type, or null if one is not found.

getLocalDeclarationType

public java.lang.Class getLocalDeclarationType(java.lang.String localDeclarationName)
Returns the type of the named local declaration, or null if one is not found.

Parameters:
localDeclarationName - The name of the local declaration.
Returns:
The type of the named local declaration, or null if one is not found.

declareLocalElement

public boolean declareLocalElement(java.lang.Object instance,
                                   java.lang.String localDeclarationName,
                                   java.lang.Object childElement)
Declares a local element with the supplied name on the specified instance.

Parameters:
instance - The instance to declare the child element on.
localDeclarationName - The name of the local declaration to invoke.
childElement - The child element to declare.
Returns:
True if the child element was successfully declared.

declarePrefixedElement

public boolean declarePrefixedElement(java.lang.Object instance,
                                      java.lang.Object childElement)
Declares a prefixed element on the specified instance.

Parameters:
instance - The instance to declare the child element on.
childElement - The child element to declare.
Returns:
True if the child element was successfully declared.


Copyright © 2003 Blues Framework. All Rights Reserved.