net.sf.fikin.pojostate.select
Class DefaultMethodMeta

java.lang.Object
  extended by net.sf.fikin.pojostate.select.AbstractMethodMeta
      extended by net.sf.fikin.pojostate.select.DefaultMethodMeta
All Implemented Interfaces:
MethodMeta
Direct Known Subclasses:
NEFormatterSelector.NEFMethodMeta

public class DefaultMethodMeta
extends AbstractMethodMeta

MethodMeta with algorithms operating solely on top of Method only.

The UI name is the method's name with option to skip "get" from "getXXX" naming, by default false.

Description is like "implemented by <class>" with option to be defaulted to null. By default false;

Value formatter is DefaultFormat with an option to provide other formatter during construction time. created on Mar 2, 2007

Since:
Version:
$Revision: 1.3 $
Author:
fiykov

Constructor Summary
DefaultMethodMeta(java.lang.reflect.Method method)
          default constructor with method The default formatter instantiated is DefaultFormat
DefaultMethodMeta(java.lang.reflect.Method method, java.text.Format format)
          default constructor with method and format
 
Method Summary
 boolean getAllowNullDesc()
          print null for description if true by default false.
 java.lang.String getDescription()
          get method description if any return simple text with implementing class and public modifier if such.
 java.text.Format getFormat()
          always return default formatter
 java.lang.String getName()
          returns the Method name if getRemoveHeadingGet() is true it will remove "get" from "getXXX" names
 boolean getRemoveHeadingGet()
          get if to remove the leading method's "get" prefix
 void setAllowNullDesc(boolean flg)
          set to true if null is to be used for description instead of default text by default this is set to false
 void setRemoveHeadingGet(boolean flg)
          set if to remove the leading "get" prefix of the method's name
 
Methods inherited from class net.sf.fikin.pojostate.select.AbstractMethodMeta
getMethod, setMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMethodMeta

public DefaultMethodMeta(java.lang.reflect.Method method)
default constructor with method

The default formatter instantiated is DefaultFormat

Parameters:
method -

DefaultMethodMeta

public DefaultMethodMeta(java.lang.reflect.Method method,
                         java.text.Format format)
default constructor with method and format

Parameters:
method -
Method Detail

setRemoveHeadingGet

public void setRemoveHeadingGet(boolean flg)
set if to remove the leading "get" prefix of the method's name


getRemoveHeadingGet

public boolean getRemoveHeadingGet()
get if to remove the leading method's "get" prefix

Returns:
true or false, by default false

setAllowNullDesc

public void setAllowNullDesc(boolean flg)
set to true if null is to be used for description instead of default text

by default this is set to false

Parameters:
flg -

getAllowNullDesc

public boolean getAllowNullDesc()
print null for description if true

by default false. It will print text in the format "implemented by <class>"

Returns:
allow null for description

getName

public java.lang.String getName()
returns the Method name

if getRemoveHeadingGet() is true it will remove "get" from "getXXX" names

Returns:
returns the UI name.

getDescription

public java.lang.String getDescription()
get method description if any

return simple text with implementing class and public modifier if such.

if getAllowNullDesc() is true it will print null.

if it is false, it will print predefined text format

Returns:
Returns the UI description.

getFormat

public java.text.Format getFormat()
always return default formatter

Returns:
Returns new instance of DefaultFormat.


Copyright © 2005 Nikolay Fiykov. All Rights Reserved.