|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectechopoint.util.ReflectionKit.MemberClassComparator
public static class ReflectionKit.MemberClassComparator
A that can be used when comparing and
sorting Comparator objects by name, modifier and
finally declaring class order.
NOTE : Member is the base class
for MemberConstructor, Field and Method and hence you
can sort any of these types with this Comparator.
If the Member's names are the same they are then sorted
by modifier and parameters and finally by declaring class with the most
specific class first.
In short it sorts in "Member / Modifiers / Parameters / Declaring Class" order.
| Constructor Summary | |
|---|---|
ReflectionKit.MemberClassComparator()
|
|
| Method Summary | |
|---|---|
int |
compare(Object o1,
Object o2)
|
protected int |
compareByConstructor(Constructor c1,
Constructor c2)
The compares the two values against
each other in the following order :
The Constructor parameter count
The Constructor parameter type
|
protected int |
compareByField(Field f1,
Field f2)
The compares the two values against
each other in the following order :
Field name
Field type
|
protected int |
compareByMethod(Method m1,
Method m2)
The compares the two values against
each other in the following order :
Method name
Method return type
Method parameter count
Method parameter types
|
protected int |
compareByModifiers(int modifier1,
int modifier2)
The compares the two values against
each other in the following order
public
protected
abstract
final
native
interface
static
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public ReflectionKit.MemberClassComparator()
| Method Detail |
|---|
public int compare(Object o1,
Object o2)
compare in interface ComparatorComparator.compare(java.lang.Object, java.lang.Object)
protected int compareByModifiers(int modifier1,
int modifier2)
Modifier values against
each other in the following order
modifier1 - -
the modifier of the first Membermodifier2 - -
the modifier of the second Member
Comparator
protected int compareByMethod(Method m1,
Method m2)
Method values against
each other in the following order :
protected int compareByField(Field f1,
Field f2)
Field values against
each other in the following order :
protected int compareByConstructor(Constructor c1,
Constructor c2)
Constructor values against
each other in the following order :
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||