org.slim3.commons.convention
Class BeanConvention

java.lang.Object
  extended by org.slim3.commons.convention.BeanConvention

public class BeanConvention
extends Object

A class for bean conventions.

Version:
3.0
Author:
higa

Field Summary
protected static String CLASS_NAME
          The class name.
static String CONVENTION_KEY
          The key for bean convention class.
protected static BeanConvention instance
          The instance.
 
Constructor Summary
BeanConvention()
          Constructor.
 
Method Summary
 String extractBeanSuffix(String name)
          Extracts a bean suffix from the name.
static BeanConvention getInstance()
          Returns the instance.
static void initialize()
          Initializes this class.
 Class<?> toBeanClass(String name)
          Converts the bean name into a bean class.
 String toBeanName(Class<?> clazz)
          Converts the class into a bean name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVENTION_KEY

public static final String CONVENTION_KEY
The key for bean convention class.

See Also:
Constant Field Values

CLASS_NAME

protected static final String CLASS_NAME
The class name.

See Also:
Constant Field Values

instance

protected static BeanConvention instance
The instance.

Constructor Detail

BeanConvention

public BeanConvention()
Constructor.

Method Detail

initialize

public static void initialize()
Initializes this class.


getInstance

public static BeanConvention getInstance()
Returns the instance.

Returns:
the instance

extractBeanSuffix

public String extractBeanSuffix(String name)
Extracts a bean suffix from the name. Return null if the suffix is not found.

Parameters:
name - the name
Returns:
a bean suffix

toBeanName

public String toBeanName(Class<?> clazz)
Converts the class into a bean name.

Parameters:
clazz - the class
Returns:
a bean name

toBeanClass

public Class<?> toBeanClass(String name)
Converts the bean name into a bean class.

Parameters:
name - the bean name.
Returns:
a bean class.


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