edu.neu.ccs.demeterf
Class Control

java.lang.Object
  extended by edu.neu.ccs.demeterf.Control
Direct Known Subclasses:
MutableControl, Nowhere

public abstract class Control
extends java.lang.Object

Base Control Class, supports the implementation of immutable (and mutable) traversal Control classes. Implements static methods that create both kinds of control for the usual needs.


Constructor Summary
Control()
           
 
Method Summary
static MutableControl builtins(java.lang.Class<?>... cls)
          Returns a mutable MutableControl with the given Classes as BuiltIns
static MutableControl bypass(java.lang.Class<?>... cs)
          Returns a mutable Control that bypasses all the Edges of the given classes
static MutableControl bypass(Edge... edges)
          Returns a mutable Control that bypasses the given Edges
static MutableControl bypass(java.lang.String s)
          Returns a mutable Control that bypasses the edges given in the string.
static MutableControl bypass(java.lang.String pkg, java.lang.String s)
          Same as bypass(String) but the first is a package in which to search for classes
static Control everywhere()
          Returns an immutable Control that permits the Everywhere Traversal
abstract  boolean ignore(java.lang.Class<?> c, java.lang.String f)
          Returns whether or not to bypass/skip the given Class/Field
abstract  boolean ignore(Edge e)
          Returns whether or not to bypass/skip the given Edge
 boolean isBuiltIn(java.lang.Class<?> c)
          Returns whether or not tthe given Class is a Builtin
 boolean isBuiltInOld(java.lang.Class<?> c)
          Returns whether or not tthe given Class is a Builtin
static Control nowhere()
          Returns an immutable Control that permits a one-step Traversal
static MutableControl only(java.lang.Class<?>... cs)
          Returns a mutable Control that traverses only (all) the Edges of the given classes
static MutableControl only(Edge... edges)
          Returns a mutable Control that only traverses the given Edges
static MutableControl only(java.lang.String s)
          Returns a mutable Control that only traverses the edges given in the string.
static MutableControl only(java.lang.String pkg, java.lang.String s)
          Same as only(String) but the first is a package in which to search for classes
static MutableControl remove(java.lang.Class<?>... cs)
          Returns a mutable Control that ignores all the Edges of the given classes
static MutableControl remove(Edge... edges)
          Returns a mutable Control that ignores the given Edges
static MutableControl remove(java.lang.String s)
          Returns a mutable Control that ignores the edges given in the string.
static MutableControl remove(java.lang.String pkg, java.lang.String s)
          Same as remove(String) but the first is a package in which to search for classes
abstract  boolean skip(java.lang.Class<?> c, java.lang.String f)
          Returns whether or not to bypass/skip the given Class/Field
abstract  boolean skip(Edge e)
          Returns whether or not to bypass/skip the given Edge
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Control

public Control()
Method Detail

everywhere

public static Control everywhere()
Returns an immutable Control that permits the Everywhere Traversal


nowhere

public static Control nowhere()
Returns an immutable Control that permits a one-step Traversal


builtins

public static MutableControl builtins(java.lang.Class<?>... cls)
Returns a mutable MutableControl with the given Classes as BuiltIns


bypass

public static MutableControl bypass(Edge... edges)
Returns a mutable Control that bypasses the given Edges


bypass

public static MutableControl bypass(java.lang.String s)
Returns a mutable Control that bypasses the edges given in the string. Edges are of the form: "Class1.field Class2.field ...". Full package names may be used, or Type.addPath(...) can be used to add a package to the class lookup path


bypass

public static MutableControl bypass(java.lang.String pkg,
                                    java.lang.String s)
Same as bypass(String) but the first is a package in which to search for classes


bypass

public static MutableControl bypass(java.lang.Class<?>... cs)
Returns a mutable Control that bypasses all the Edges of the given classes


only

public static MutableControl only(Edge... edges)
Returns a mutable Control that only traverses the given Edges


only

public static MutableControl only(java.lang.String s)
Returns a mutable Control that only traverses the edges given in the string. Edges are of the form: "Class1.field Class2.field ...". Full package names may be used, or Type.addPath(...) can be used to add a package to the class lookup path


only

public static MutableControl only(java.lang.String pkg,
                                  java.lang.String s)
Same as only(String) but the first is a package in which to search for classes


only

public static MutableControl only(java.lang.Class<?>... cs)
Returns a mutable Control that traverses only (all) the Edges of the given classes


remove

public static MutableControl remove(Edge... edges)
Returns a mutable Control that ignores the given Edges


remove

public static MutableControl remove(java.lang.String s)
Returns a mutable Control that ignores the edges given in the string. Edges are of the form: "Class1.field Class2.field ...". Full package names may be used, or Type.addPath(...) can be used to add a package to the class lookup path


remove

public static MutableControl remove(java.lang.String pkg,
                                    java.lang.String s)
Same as remove(String) but the first is a package in which to search for classes


remove

public static MutableControl remove(java.lang.Class<?>... cs)
Returns a mutable Control that ignores all the Edges of the given classes


skip

public abstract boolean skip(java.lang.Class<?> c,
                             java.lang.String f)
Returns whether or not to bypass/skip the given Class/Field


skip

public abstract boolean skip(Edge e)
Returns whether or not to bypass/skip the given Edge


ignore

public abstract boolean ignore(java.lang.Class<?> c,
                               java.lang.String f)
Returns whether or not to bypass/skip the given Class/Field


ignore

public abstract boolean ignore(Edge e)
Returns whether or not to bypass/skip the given Edge


isBuiltInOld

public boolean isBuiltInOld(java.lang.Class<?> c)
Returns whether or not tthe given Class is a Builtin


isBuiltIn

public boolean isBuiltIn(java.lang.Class<?> c)
Returns whether or not tthe given Class is a Builtin