org.slim3.container
Class Binding

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

public class Binding
extends Object

A binding class for Resource annotation.

Since:
3.0
Author:
higa

Field Summary
protected  Field field
          The field.
protected  String name
          The name.
protected  Method writeMethod
          The write method.
 
Constructor Summary
Binding(String name, Field field)
          Constructor.
Binding(String name, Field field, Method writeMethod)
          Constructor.
 
Method Summary
 void bind(Object bean, S3Container container)
          Binds specified object to the bean.
 Field getField()
          Returns the field.
 String getName()
          Returns the name.
 Method getWriteMethod()
          Returns the write method.
 
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 name.


field

protected Field field
The field.


writeMethod

protected Method writeMethod
The write method.

Constructor Detail

Binding

public Binding(String name,
               Field field)
Constructor.

Parameters:
name - the name
field - the field
See Also:
Binding(String, Field, Method)

Binding

public Binding(String name,
               Field field,
               Method writeMethod)
        throws NullPointerException
Constructor.

Parameters:
name - the name
field - the field
writeMethod - the write method
Throws:
NullPointerException - if the name parameter is null or if the field parameter is null
Method Detail

getName

public String getName()
Returns the name.

Returns:
the name

getField

public Field getField()
Returns the field.

Returns:
the field

getWriteMethod

public Method getWriteMethod()
Returns the write method.

Returns:
the write method

bind

public void bind(Object bean,
                 S3Container container)
          throws BindingFailureRuntimeException,
                 PropertyCanNotWriteRuntimeException
Binds specified object to the bean.

Parameters:
bean - the bean
container - the container
Throws:
BindingFailureRuntimeException - if an exception is encountered while looking up the container
PropertyCanNotWriteRuntimeException - if an exception is encountered while writing property value


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