org.apache.myfaces.trinidad.bean
Class FacesBean.Type

java.lang.Object
  extended by org.apache.myfaces.trinidad.bean.FacesBean.Type
Enclosing interface:
FacesBean

public static class FacesBean.Type
extends Object

Type of a FacesBean, encapsulating the set of registered PropertyKeys.


Constructor Summary
FacesBean.Type()
           
FacesBean.Type(FacesBean.Type superType)
           
 
Method Summary
protected  void addKey(PropertyKey key)
          Add a key to the type.
protected  PropertyKey createPropertyKey(String name, Class<?> type, Object defaultValue, int capabilities, int index)
           
protected  PropertyKey createPropertyKey(String name, Class<?> type, Object defaultValue, int capabilities, int index, PropertyKey.Mutable mutable)
           
 PropertyKey findKey(int index)
          Find an existing key by index.
 PropertyKey findKey(String name)
          Find an existing key by name.
protected  int getNextIndex()
          Return the next available index.
 Iterator<PropertyKey> keys()
          Returns the iterator of registered property keys, excluding aliases.
 void lock()
          Locks the type object, preventing further changes.
 void lockAndRegister(String componentFamily, String rendererType)
          Locks the type object, preventing further changes.
 Collection<PropertyKey> propertyKeys()
          Returns an unmodifiable Collection of registered property keys, excluding aliases.
 PropertyKey registerAlias(PropertyKey key, String alias)
          Add an alias to an existing PropertyKey.
 PropertyKey registerKey(String name)
          Register a new key.
 PropertyKey registerKey(String name, Class<?> type)
          Register a new key.
 PropertyKey registerKey(String name, Class<?> type, int capabilities)
          Register a new key.
 PropertyKey registerKey(String name, Class<?> type, Object defaultValue)
          Register a new key.
 PropertyKey registerKey(String name, Class<?> type, Object defaultValue, int capabilities)
           
 PropertyKey registerKey(String name, Class<?> type, Object defaultValue, int capabilities, PropertyKey.Mutable mutable)
          Register a new key with a set of capabilities.
 PropertyKey registerKey(String name, int capabilities)
          Register a new key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesBean.Type

public FacesBean.Type()

FacesBean.Type

public FacesBean.Type(FacesBean.Type superType)
Method Detail

findKey

public PropertyKey findKey(String name)
Find an existing key by name.


findKey

public PropertyKey findKey(int index)
Find an existing key by index.


registerKey

public final PropertyKey registerKey(String name,
                                     Class<?> type,
                                     Object defaultValue)
Register a new key.

Throws:
IllegalStateException - if the type is already locked, or the key does not already exists.

registerKey

public final PropertyKey registerKey(String name,
                                     Class<?> type)
Register a new key.

Throws:
IllegalStateException - if the type is already locked, or the key does not already exists.

registerKey

public final PropertyKey registerKey(String name)
Register a new key.

Throws:
IllegalStateException - if the type is already locked, or the key does not already exists.

registerKey

public final PropertyKey registerKey(String name,
                                     int capabilities)
Register a new key.

Throws:
IllegalStateException - if the type is already locked, or the key does not already exists.

registerKey

public final PropertyKey registerKey(String name,
                                     Class<?> type,
                                     int capabilities)
Register a new key.

Throws:
IllegalStateException - if the type is already locked, or the key does not already exists.

registerKey

public PropertyKey registerKey(String name,
                               Class<?> type,
                               Object defaultValue,
                               int capabilities)

registerAlias

public PropertyKey registerAlias(PropertyKey key,
                                 String alias)
Add an alias to an existing PropertyKey.

Throws:
IllegalStateException - if the type is already locked, or a key already exists at the alias.

registerKey

public PropertyKey registerKey(String name,
                               Class<?> type,
                               Object defaultValue,
                               int capabilities,
                               PropertyKey.Mutable mutable)
Register a new key with a set of capabilities.

Throws:
IllegalStateException - if the type is already locked, or the key already exists.

lock

public void lock()
Locks the type object, preventing further changes.


lockAndRegister

public void lockAndRegister(String componentFamily,
                            String rendererType)
Locks the type object, preventing further changes.


keys

public Iterator<PropertyKey> keys()
Returns the iterator of registered property keys, excluding aliases.


propertyKeys

public Collection<PropertyKey> propertyKeys()
Returns an unmodifiable Collection of registered property keys, excluding aliases.

Returns:
unmodifiable Collection with registered

createPropertyKey

protected PropertyKey createPropertyKey(String name,
                                        Class<?> type,
                                        Object defaultValue,
                                        int capabilities,
                                        int index)

createPropertyKey

protected PropertyKey createPropertyKey(String name,
                                        Class<?> type,
                                        Object defaultValue,
                                        int capabilities,
                                        int index,
                                        PropertyKey.Mutable mutable)

getNextIndex

protected int getNextIndex()
Return the next available index.


addKey

protected void addKey(PropertyKey key)
Add a key to the type.

Throws:
IllegalStateException - if the type is already locked, or a key with that name or index already exists.


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.