FileDocCategorySizeDatePackage
Errors.javaAPI DocAndroid 1.5 API5112Wed May 06 22:41:00 BST 2009com.android.apicheck

Errors

public class Errors extends Object

Fields Summary
public static boolean
hadError
private static boolean
warningsAreErrors
private static TreeSet
allErrors
public static int
HIDDEN
public static int
WARNING
public static int
ERROR
public static Error
PARSE_ERROR
public static Error
ADDED_PACKAGE
public static Error
ADDED_CLASS
public static Error
ADDED_METHOD
public static Error
ADDED_FIELD
public static Error
ADDED_INTERFACE
public static Error
REMOVED_PACKAGE
public static Error
REMOVED_CLASS
public static Error
REMOVED_METHOD
public static Error
REMOVED_FIELD
public static Error
REMOVED_INTERFACE
public static Error
CHANGED_STATIC
public static Error
CHANGED_FINAL
public static Error
CHANGED_TRANSIENT
public static Error
CHANGED_VOLATILE
public static Error
CHANGED_TYPE
public static Error
CHANGED_VALUE
public static Error
CHANGED_SUPERCLASS
public static Error
CHANGED_SCOPE
public static Error
CHANGED_ABSTRACT
public static Error
CHANGED_THROWS
public static Error
CHANGED_NATIVE
public static Error
CHANGED_CLASS
public static Error
CHANGED_DEPRECATED
public static Error
CHANGED_SYNCHRONIZED
public static Error[]
ERRORS
Constructors Summary
Methods Summary
public static voiderror(com.android.apicheck.Errors$Error error, SourcePositionInfo where, java.lang.String text)

        if (error.level == HIDDEN) {
            return;
        }

        String which = (!warningsAreErrors && error.level == WARNING) ? " warning " : " error ";
        String message = which + error.code + ": " + text;

        if (where == null) {
            where = new SourcePositionInfo("unknown", 0, 0);
        }

        allErrors.add(new Message(where, message));

        if (error.level == ERROR || (warningsAreErrors && error.level == WARNING)) {
            hadError = true;
        }
    
public static voidprintErrors()

        for (Message m: allErrors) {
            System.err.println(m.toString());
        }
    
public static booleansetErrorLevel(int code, int level)


           
        for (Error e: ERRORS) {
            if (e.code == code) {
                e.level = level;
                return true;
            }
        }
        return false;
    
public static voidsetWarningsAreErrors(boolean val)


         
        warningsAreErrors = val;