org.slim3.container
Class BeanMeta

java.lang.Object
  extended by org.slim3.container.BeanMeta

public class BeanMeta
extends Object

A meta data class for bean.

Version:
3.0
Author:
higa

Field Summary
protected  Class<?> beanClass
          The bean class.
protected  ArrayMap<String,Binding> bindings
          The binding collection.
protected  Class<?> enhancedBeanClass
          The enhanced bean class.
protected  Map<Method,Interceptor[]> interceptorsMap
          The map for interceptors.
protected  String name
          The bean name.
 
Constructor Summary
BeanMeta(String name, Class<?> beanClass)
          Constructor.
 
Method Summary
 void addBinding(String propertyName, Binding binding)
          Adds the binding.
 Class<?> getBeanClass()
          Returns the bean class.
 Binding getBinding(int index)
          Returns the binding for the index.
 Binding getBinding(String propertyName)
          Returns the binding for the property name.
 int getBindingSize()
          Returns the number of bindings.
 Class<?> getEnhancedBeanClass()
          Returns the enhanced bean class.
 Map<Method,Interceptor[]> getInterceptorsMap()
          Returns the map for interceptors.
 String getName()
          Return the bean name.
 boolean hasBinding(String propertyName)
          Determines if this class has the property.
 void setInterceptorsMap(Map<Method,Interceptor[]> interceptorsMap)
          Sets the map for interceptors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
The bean name.


beanClass

protected Class<?> beanClass
The bean class.


enhancedBeanClass

protected Class<?> enhancedBeanClass
The enhanced bean class.


bindings

protected ArrayMap<String,Binding> bindings
The binding collection.


interceptorsMap

protected Map<Method,Interceptor[]> interceptorsMap
The map for interceptors.

Constructor Detail

BeanMeta

public BeanMeta(String name,
                Class<?> beanClass)
Constructor.

Parameters:
name - the bean name
beanClass - the bean class
Throws:
NullPointerException - if the name parameter is null or if the beanClass parameter is null
Method Detail

getName

public String getName()
Return the bean name.

Returns:
the bean name

getBeanClass

public Class<?> getBeanClass()
Returns the bean class.

Returns:
the bean class

getEnhancedBeanClass

public Class<?> getEnhancedBeanClass()
Returns the enhanced bean class.

Returns:
the enhanced bean class

getBindingSize

public int getBindingSize()
Returns the number of bindings.

Returns:
the number of bindings

getBinding

public Binding getBinding(int index)
Returns the binding for the index.

Parameters:
index - the index
Returns:
the binding

getBinding

public Binding getBinding(String propertyName)
                   throws BindingNotFoundRuntimeException
Returns the binding for the property name.

Parameters:
propertyName - the property name
Returns:
the binding
Throws:
BindingNotFoundRuntimeException - if the binding is not found

hasBinding

public boolean hasBinding(String propertyName)
Determines if this class has the property.

Parameters:
propertyName - the property name
Returns:
whether this class has the property

addBinding

public void addBinding(String propertyName,
                       Binding binding)
Adds the binding.

Parameters:
propertyName - the property name
binding - the binding

getInterceptorsMap

public Map<Method,Interceptor[]> getInterceptorsMap()
Returns the map for interceptors.

Returns:
the map for interceptors

setInterceptorsMap

public void setInterceptorsMap(Map<Method,Interceptor[]> interceptorsMap)
Sets the map for interceptors.

Parameters:
interceptorsMap - the map for interceptors.


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.