org.omnaest.utils.beans.result
Class BeanMethodInformation

java.lang.Object
  extended by org.omnaest.utils.beans.result.BeanMethodInformation

public class BeanMethodInformation
extends Object

Information object for methods of bean classes.

Author:
Omnaest

Field Summary
protected  boolean isGetter
           
protected  boolean isGetterWithAdditionalArguments
           
protected  boolean isSetter
           
protected  boolean isSetterWithAdditionalArguments
           
protected  Method method
           
protected  String referencedFieldName
           
 
Constructor Summary
BeanMethodInformation(boolean isGetter, boolean isSetter, boolean isGetterWithAdditionalArguments, boolean isSetterWithAdditionalArguments, String referencedFieldName, Method method)
           
 
Method Summary
 Method getMethod()
          Returns the underlying Method.
 String getPropertyName()
          Get the field name which is referenced by this method.
 boolean isFieldAccessMethod()
          Returns true, if the given method is a field access method.
 boolean isGetter()
          Returns true, if the method has no parameters but a return type.
 boolean isGetterWithAdditionalArguments()
          Returns true, if a method begins with "get" or "is" and has more than one parameter and at least two and has a return type.
 boolean isSetter()
          Is true, if a method has only one parameter and begins with "set".
 boolean isSetterWithAdditionalArguments()
          Returns true, if a method begins with "set" and has at least two parameter or more.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isGetter

protected boolean isGetter

isSetter

protected boolean isSetter

isGetterWithAdditionalArguments

protected boolean isGetterWithAdditionalArguments

isSetterWithAdditionalArguments

protected boolean isSetterWithAdditionalArguments

referencedFieldName

protected String referencedFieldName

method

protected Method method
Constructor Detail

BeanMethodInformation

public BeanMethodInformation(boolean isGetter,
                             boolean isSetter,
                             boolean isGetterWithAdditionalArguments,
                             boolean isSetterWithAdditionalArguments,
                             String referencedFieldName,
                             Method method)
Parameters:
isGetter -
isSetter -
isGetterWithAdditionalArguments -
isSetterWithAdditionalArguments -
referencedFieldName -
method -
Method Detail

isFieldAccessMethod

public boolean isFieldAccessMethod()
Returns true, if the given method is a field access method.

Returns:

isGetter

public boolean isGetter()
Returns true, if the method has no parameters but a return type.

Returns:

isSetter

public boolean isSetter()
Is true, if a method has only one parameter and begins with "set". A return type is optional.

Returns:

getPropertyName

public String getPropertyName()
Get the field name which is referenced by this method.

Returns:

getMethod

public Method getMethod()
Returns the underlying Method.

Returns:

isGetterWithAdditionalArguments

public boolean isGetterWithAdditionalArguments()
Returns true, if a method begins with "get" or "is" and has more than one parameter and at least two and has a return type.

Returns:

isSetterWithAdditionalArguments

public boolean isSetterWithAdditionalArguments()
Returns true, if a method begins with "set" and has at least two parameter or more.

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.