org.omnaest.utils.beans
Class BeanUtil.PropertyCriterion

java.lang.Object
  extended by org.omnaest.utils.beans.BeanUtil.PropertyCriterion
Direct Known Subclasses:
BeanUtil.PropertyCriterionAnnotationname, BeanUtil.PropertyCriterionConjunction, BeanUtil.PropertyCriterionHasGetterSetter, BeanUtil.PropertyCriterionMethodname
Enclosing class:
BeanUtil

public abstract static class BeanUtil.PropertyCriterion
extends Object

Defines a interface for a criterion to retrieve property names of an object. This root class defines static methods which return criterias for the most common cases.

Author:
Omnaest
See Also:
BeanUtil.determineBeanProperties(Class, PropertyCriterion...), #prepareInspection(Object), inspectMethod(Method)

Constructor Summary
BeanUtil.PropertyCriterion()
           
 
Method Summary
static BeanUtil.PropertyCriterion and(BeanUtil.PropertyCriterion... propertyCriteria)
           
static BeanUtil.PropertyCriterion annotationname(String... annotationNames)
           
static BeanUtil.PropertyCriterion hasGetter()
           
static BeanUtil.PropertyCriterion hasGetterAndSetter()
           
static BeanUtil.PropertyCriterion hasGetterOrSetter()
           
static BeanUtil.PropertyCriterion hasSetter()
           
abstract  boolean inspectMethod(Method method)
          This method is called for every declared method.
static BeanUtil.PropertyCriterion methodname(String methodName)
           
static BeanUtil.PropertyCriterion or(BeanUtil.PropertyCriterion... propertyCriteria)
           
abstract  void prepareInspection(Class<?> clazz)
          This method will be called once before the inspection process runs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanUtil.PropertyCriterion

public BeanUtil.PropertyCriterion()
Method Detail

prepareInspection

public abstract void prepareInspection(Class<?> clazz)
This method will be called once before the inspection process runs. This can be used to collect needed information.

Parameters:
object -

inspectMethod

public abstract boolean inspectMethod(Method method)
This method is called for every declared method. The method should return true if the method matches the criteria.

Parameters:
method -
Returns:

and

public static BeanUtil.PropertyCriterion and(BeanUtil.PropertyCriterion... propertyCriteria)
Parameters:
propertyCriteria -
Returns:
See Also:
BeanUtil.PropertyCriterionConjunctionAND

or

public static BeanUtil.PropertyCriterion or(BeanUtil.PropertyCriterion... propertyCriteria)
Parameters:
propertyCriteria -
Returns:
See Also:
BeanUtil.PropertyCriterionConjunctionOR

methodname

public static BeanUtil.PropertyCriterion methodname(String methodName)
Parameters:
methodName -
Returns:
See Also:
BeanUtil.PropertyCriterionMethodname

annotationname

public static BeanUtil.PropertyCriterion annotationname(String... annotationNames)
Parameters:
annotationName -
Returns:
See Also:
BeanUtil.PropertyCriterionAnnotationname

hasGetter

public static BeanUtil.PropertyCriterion hasGetter()
Returns:
See Also:
BeanUtil.PropertyCriterionHasGetterSetter

hasSetter

public static BeanUtil.PropertyCriterion hasSetter()
Returns:
See Also:
BeanUtil.PropertyCriterionHasGetterSetter

hasGetterAndSetter

public static BeanUtil.PropertyCriterion hasGetterAndSetter()
Returns:
See Also:
BeanUtil.PropertyCriterionHasGetterSetter

hasGetterOrSetter

public static BeanUtil.PropertyCriterion hasGetterOrSetter()
Returns:
See Also:
BeanUtil.PropertyCriterionHasGetterSetter


Copyright © 2011. All Rights Reserved.