org.codehaus.aspectwerkz
Class MethodComparator

java.lang.Object
  extended byorg.codehaus.aspectwerkz.MethodComparator
All Implemented Interfaces:
java.util.Comparator

public final class MethodComparator
extends java.lang.Object
implements java.util.Comparator

Compares Methods. To be used when sorting methods. Based on code by Bob Lee (crazybob@crazybob.org)

Author:
Jonas Bonér

Field Summary
static int METHOD_META_DATA
          Compares method meta-data.
static int NORMAL_METHOD
          Compares normal method names.
static int PREFIXED_METHOD
          Compares prefixed method names.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two objects.
static java.util.Comparator getInstance(int type)
          Returns the comparator instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

NORMAL_METHOD

public static final int NORMAL_METHOD
Compares normal method names.

See Also:
Constant Field Values

PREFIXED_METHOD

public static final int PREFIXED_METHOD
Compares prefixed method names.

See Also:
Constant Field Values

METHOD_META_DATA

public static final int METHOD_META_DATA
Compares method meta-data.

See Also:
Constant Field Values
Method Detail

getInstance

public static java.util.Comparator getInstance(int type)
Returns the comparator instance.

Parameters:
type - the type of the method comparison
Returns:
the instance

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two objects.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 -
o2 -
Returns:
int


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.