|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hunsicker.jalopy.language.MethodType
Represents a method type to distinguish between ordinary method names and those which adhere to the Java Bean naming conventions.
The default order for comparing is: ordinary Java method names, mutator,
accessor/tester. This can be changed via setOrder(java.lang.String)
.
Field Summary | |
static MethodType |
GETTER
Represents a Java Bean accessor. |
static MethodType |
OTHER
Represents an ordinary Java method. |
static MethodType |
SETTER
Represents a Java Bean mutator. |
static MethodType |
TESTER
Represents a Java Bean accessor/tester. |
Method Summary | |
int |
compareTo(Object other)
Compares this object with the specified object for order. |
static String |
getOrder()
Returns a string representation of the current sort order. |
boolean |
isBean()
Indicates whether this type represents a Java Bean method. |
static void |
setOrder(String str)
Sets the order to use as the natural order. |
String |
toString()
Returns a string representation of this method type. |
static MethodType |
valueOf(String name)
Returns the method type of the given method name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final MethodType GETTER
public static final MethodType SETTER
public static final MethodType TESTER
public static final MethodType OTHER
Method Detail |
public static void setOrder(String str)
str
- a string representing the new order. The string must consist of exactly
four different, comma delimited strings which represents a method type
(e.g. isFoo,getFoo,setFoo,foo
)IllegalArgumentException
- if the given string is invalid.public static String getOrder()
isFoo,getFoo,setFoo,foo or foo,getFoo,isFoo,setFoo or ...
public int compareTo(Object other)
compareTo
in interface Comparable
other
- the object to be compared.ClassCastException
- if the specified object's type prevents it from being
compared to this object.public String toString()
toString
in class Object
public static MethodType valueOf(String name)
name
- a method name.IllegalArgumentException
- if no valid method name is given.public boolean isBean()
true
if this method type adheres to the Java Bean naming
conventions.
|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |