net.sf.fikin.pojostate.select
Class BeanMethodsSelector

java.lang.Object
  extended by net.sf.fikin.pojostate.select.AbstractSelector
      extended by net.sf.fikin.pojostate.select.BeanMethodsSelector
All Implemented Interfaces:
Selector
Direct Known Subclasses:
NEFormatterSelector

public class BeanMethodsSelector
extends AbstractSelector

Select all Bean getter methods

Backed by DefaultMethodMeta for name, description and format. created on Mar 1, 2007

Since:
Version:
$Revision: 1.2 $
Author:
fiykov

Constructor Summary
BeanMethodsSelector()
           
 
Method Summary
 boolean getFilteroutObject()
          are java-lang.Object methods filtered out automatically
protected  boolean isApplicable(java.lang.Class clazz, java.lang.reflect.Method method, java.util.Locale locale, java.lang.ClassLoader loader)
          test if given method is Bean getter one
protected  MethodMeta newMethodMeta(java.lang.Class clazz, java.lang.reflect.Method method, java.util.Locale locale, java.lang.ClassLoader loader)
          instantiate new DefaultMethodMeta object
 void setFilteroutObject(boolean flg)
          should java.lang.Object methods be filtered out
 
Methods inherited from class net.sf.fikin.pojostate.select.AbstractSelector
getMethodMeta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanMethodsSelector

public BeanMethodsSelector()
Method Detail

setFilteroutObject

public void setFilteroutObject(boolean flg)
should java.lang.Object methods be filtered out

Parameters:
flg - is true they will be filtered out, if false they will be included

getFilteroutObject

public boolean getFilteroutObject()
are java-lang.Object methods filtered out automatically

Returns:
true if they are (by default), otherwise false

isApplicable

protected boolean isApplicable(java.lang.Class clazz,
                               java.lang.reflect.Method method,
                               java.util.Locale locale,
                               java.lang.ClassLoader loader)
test if given method is Bean getter one

Specified by:
isApplicable in class AbstractSelector
Parameters:
clazz - is POJO's class
method - is some of the clazz methods, currently being tested if it is to be observed
locale - to be used when creating the metadata
loader - is the classloader to be used to load any resource file (if required)
Returns:
true if it is bean getter method, otherwise false

newMethodMeta

protected MethodMeta newMethodMeta(java.lang.Class clazz,
                                   java.lang.reflect.Method method,
                                   java.util.Locale locale,
                                   java.lang.ClassLoader loader)
                            throws DecorationException
instantiate new DefaultMethodMeta object

Specified by:
newMethodMeta in class AbstractSelector
Parameters:
clazz - is POJO's class
method - to be included
locale - to be used when creating the metadata
loader - is the classloader to be used to load any resource file (if required)
Returns:
new DefaultMethodMeta object
Throws:
DecorationException - in case of internal error


Copyright © 2005 Nikolay Fiykov. All Rights Reserved.