org.codehaus.waffle.action.intercept
Class MethodInterceptorComparator

java.lang.Object
  extended by org.codehaus.waffle.action.intercept.MethodInterceptorComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<MethodInterceptor>

public class MethodInterceptorComparator
extends java.lang.Object
implements java.util.Comparator<MethodInterceptor>, java.io.Serializable

Comparator implementation that is used by Waffle to ensure that MethodInterceptors are executed in the correct order.

See Also:
Serialized Form

Constructor Summary
MethodInterceptorComparator()
           
 
Method Summary
 int compare(MethodInterceptor first, MethodInterceptor second)
          Will compare both MethodInterceptors being compared to determine the correct evaluation order.
 
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

MethodInterceptorComparator

public MethodInterceptorComparator()
Method Detail

compare

public int compare(MethodInterceptor first,
                   MethodInterceptor second)
Will compare both MethodInterceptors being compared to determine the correct evaluation order.

Specified by:
compare in interface java.util.Comparator<MethodInterceptor>
Parameters:
first - the first MethodInterceptor to be compared
second - the second MethodInterceptor to be compared
Returns:
a negative integer, zero, or a positive integer as the first MethodInterceptor is less than, equal to, or greater than the second.
See Also:
Sortable


Copyright © 2008. All Rights Reserved.