org.apache.openjpa.meta
Class MetaDataInheritanceComparator

java.lang.Object
  extended by org.apache.openjpa.meta.MetaDataInheritanceComparator
All Implemented Interfaces:
java.util.Comparator

public class MetaDataInheritanceComparator
extends java.lang.Object

Comparator that keeps metadatas in inheritance order.

Author:
Abe White

Constructor Summary
MetaDataInheritanceComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 void setBase(java.lang.Class base)
          Set the least-derived type possible; defaults to Object.class.
protected  java.lang.Class toClass(java.lang.Object elem)
          Subclasses can override this method to extract the class to compare on from the elements of the collection.
 
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

MetaDataInheritanceComparator

public MetaDataInheritanceComparator()
Method Detail

toClass

protected java.lang.Class toClass(java.lang.Object elem)
Subclasses can override this method to extract the class to compare on from the elements of the collection.


setBase

public void setBase(java.lang.Class base)
Set the least-derived type possible; defaults to Object.class.


compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator


Copyright © 2006 Apache Software Foundation. All Rights Reserved.