JML

org.jmlspecs.jmlspec
Class JspComparator

java.lang.Object
  extended byorg.jmlspecs.jmlspec.JspComparator

public class JspComparator
extends Object

This class compares two compilation units to be sure that the specifications match appropriately.


Field Summary
(package private)  String eol
           
(package private)  ModifierUtility modutil
           
(package private)  boolean printPath
           
(package private)  int privacyLevel
           
(package private)  boolean showInherited
           
(package private)  boolean showMissing
           
(package private)  boolean synch
           
(package private)  boolean verbose
           
(package private)  boolean veryQuiet
           
 
Constructor Summary
JspComparator(JspOptions options)
           
 
Method Summary
 boolean checkDefaultConstructor(JMethodDeclarationType method, JMethodDeclarationType[] methods, JMethodDeclarationType[] jmethods)
          Returns true if method is the one constructor in methods, has no arguments, and jmethods contains no constructors.
 boolean checkInheritance(JMethodDeclarationType m, Class cc)
           
 boolean checkPrivacy(long mods)
           
 String compare(JCompilationUnitType cu, JCompilationUnitType cujava)
           
 String compareExceptions(CClassType[] exc, Class[] jexc, String method, String filename, String jfilename, String token)
           
 String compareExceptions(CClassType[] exc, CClassType[] jexc, String method, String filename, String jfilename, String token)
           
 String compareField(JFieldDeclarationType field, Field jfield, String filename, String jfilename, long modsToIgnore)
           
 String compareField(JFieldDeclarationType field, JFieldDeclarationType jfield, String filename, String jfilename, long modsToIgnore)
           
 String compareFields(JFieldDeclarationType[] fields, Field[] jfields, String filename, String jfilename, long modsToIgnore)
           
 String compareFields(JFieldDeclarationType[] fields, JFieldDeclarationType[] jfields, String filename, String jfilename, long modsToIgnore)
           
 String compareGFs(ArrayList tlmethods, ArrayList jtlmethods, String filename, String jfilename)
           
 String compareMethod(JMethodDeclarationType method, Member jmethod, String filename, String jfilename, long modsToIgnore)
           
 String compareMethod(JMethodDeclarationType method, JMethodDeclarationType jmethod, String filename, String jfilename, long modsToIgnore)
           
 String compareMethods(JMethodDeclarationType[] methods, Member[] jmethods, String filename, String jfilename, long modsToignore, Class cc)
           
 String compareMethods(JMethodDeclarationType[] methods, JMethodDeclarationType[] jmethods, String filename, String jfilename, long modsToignore)
           
 String compareToClass(JCompilationUnitType cu)
           
 String compareType(JTypeDeclarationType ty, Class cc, String filename, String jfilename)
           
 String compareType(JTypeDeclarationType ty, JTypeDeclarationType jty, String filename, String jfilename)
           
 String compareTypes(JTypeDeclarationType[] types, Class[] jtypes, String filename, String jfilename)
           
 String compareTypes(JTypeDeclarationType[] types, JTypeDeclarationType[] jtypes, String filename, String jfilename)
           
 boolean isARuntimeException(String ident)
          Returns true if the argument is the name of a class that inherits from RuntimeException.
 boolean isInterface(JTypeDeclarationType t)
           
 boolean isSynthetic(Member m)
           
 boolean matches(JMethodDeclarationType method, Member jmethod)
           
 boolean matches(JMethodDeclarationType method, JMethodDeclarationType jmethod)
           
 String signature(Member m)
           
 String signature(JMethodDeclarationType m)
           
 String toString(Class c)
           
 boolean typeNamesMatch(String s, String ss)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eol

final String eol

printPath

boolean printPath

showMissing

boolean showMissing

showInherited

boolean showInherited

synch

boolean synch

privacyLevel

int privacyLevel

verbose

boolean verbose

veryQuiet

boolean veryQuiet

modutil

final ModifierUtility modutil
Constructor Detail

JspComparator

public JspComparator(JspOptions options)
Method Detail

checkPrivacy

public boolean checkPrivacy(long mods)

compare

public String compare(JCompilationUnitType cu,
                      JCompilationUnitType cujava)

compareToClass

public String compareToClass(JCompilationUnitType cu)

compareGFs

public String compareGFs(ArrayList tlmethods,
                         ArrayList jtlmethods,
                         String filename,
                         String jfilename)

compareTypes

public String compareTypes(JTypeDeclarationType[] types,
                           JTypeDeclarationType[] jtypes,
                           String filename,
                           String jfilename)

compareTypes

public String compareTypes(JTypeDeclarationType[] types,
                           Class[] jtypes,
                           String filename,
                           String jfilename)

isInterface

public boolean isInterface(JTypeDeclarationType t)

compareType

public String compareType(JTypeDeclarationType ty,
                          JTypeDeclarationType jty,
                          String filename,
                          String jfilename)

typeNamesMatch

public boolean typeNamesMatch(String s,
                              String ss)

compareType

public String compareType(JTypeDeclarationType ty,
                          Class cc,
                          String filename,
                          String jfilename)

compareFields

public String compareFields(JFieldDeclarationType[] fields,
                            JFieldDeclarationType[] jfields,
                            String filename,
                            String jfilename,
                            long modsToIgnore)

compareFields

public String compareFields(JFieldDeclarationType[] fields,
                            Field[] jfields,
                            String filename,
                            String jfilename,
                            long modsToIgnore)

compareField

public String compareField(JFieldDeclarationType field,
                           JFieldDeclarationType jfield,
                           String filename,
                           String jfilename,
                           long modsToIgnore)

compareField

public String compareField(JFieldDeclarationType field,
                           Field jfield,
                           String filename,
                           String jfilename,
                           long modsToIgnore)

compareMethods

public String compareMethods(JMethodDeclarationType[] methods,
                             JMethodDeclarationType[] jmethods,
                             String filename,
                             String jfilename,
                             long modsToignore)

compareMethods

public String compareMethods(JMethodDeclarationType[] methods,
                             Member[] jmethods,
                             String filename,
                             String jfilename,
                             long modsToignore,
                             Class cc)

checkInheritance

public boolean checkInheritance(JMethodDeclarationType m,
                                Class cc)

isSynthetic

public boolean isSynthetic(Member m)

checkDefaultConstructor

public boolean checkDefaultConstructor(JMethodDeclarationType method,
                                       JMethodDeclarationType[] methods,
                                       JMethodDeclarationType[] jmethods)
Returns true if method is the one constructor in methods, has no arguments, and jmethods contains no constructors.


matches

public boolean matches(JMethodDeclarationType method,
                       JMethodDeclarationType jmethod)

matches

public boolean matches(JMethodDeclarationType method,
                       Member jmethod)

signature

public String signature(JMethodDeclarationType m)

signature

public String signature(Member m)

compareMethod

public String compareMethod(JMethodDeclarationType method,
                            JMethodDeclarationType jmethod,
                            String filename,
                            String jfilename,
                            long modsToIgnore)

compareMethod

public String compareMethod(JMethodDeclarationType method,
                            Member jmethod,
                            String filename,
                            String jfilename,
                            long modsToIgnore)

compareExceptions

public String compareExceptions(CClassType[] exc,
                                CClassType[] jexc,
                                String method,
                                String filename,
                                String jfilename,
                                String token)

compareExceptions

public String compareExceptions(CClassType[] exc,
                                Class[] jexc,
                                String method,
                                String filename,
                                String jfilename,
                                String token)

isARuntimeException

public boolean isARuntimeException(String ident)
Returns true if the argument is the name of a class that inherits from RuntimeException.


toString

public String toString(Class c)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.