com.google.javascript.jscomp
Class DiagnosticGroup

java.lang.Object
  extended by com.google.javascript.jscomp.DiagnosticGroup
All Implemented Interfaces:
Serializable

public class DiagnosticGroup
extends Object
implements Serializable

Group a set of related diagnostic types together, so that they can be toggled on and off as one unit.

See Also:
Serialized Form

Constructor Summary
DiagnosticGroup(DiagnosticGroup... groups)
          Create a composite group.
DiagnosticGroup(DiagnosticType... types)
          Create a group that matches all errors of the given types.
DiagnosticGroup(String name, DiagnosticGroup... groups)
          Create a composite group.
 
Method Summary
static DiagnosticGroup forType(DiagnosticType type)
          Create a diagnostic group that matches only the given type.
 Iterable<DiagnosticType> getTypes()
          Returns an iterable over all the types in this group.
 boolean matches(DiagnosticType type)
          Returns whether the given type matches a type in this group.
 boolean matches(JSError error)
          Returns whether the given error's type matches a type in this group.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiagnosticGroup

public DiagnosticGroup(DiagnosticType... types)
Create a group that matches all errors of the given types.


DiagnosticGroup

public DiagnosticGroup(DiagnosticGroup... groups)
Create a composite group.


DiagnosticGroup

public DiagnosticGroup(String name,
                       DiagnosticGroup... groups)
Create a composite group.

Method Detail

forType

public static DiagnosticGroup forType(DiagnosticType type)
Create a diagnostic group that matches only the given type.


matches

public boolean matches(JSError error)
Returns whether the given error's type matches a type in this group.


matches

public boolean matches(DiagnosticType type)
Returns whether the given type matches a type in this group.


getTypes

public Iterable<DiagnosticType> getTypes()
Returns an iterable over all the types in this group.


toString

public String toString()
Overrides:
toString in class Object