edu.neu.ccs.demeterf.control
Class EdgeBypass

java.lang.Object
  extended by edu.neu.ccs.demeterf.Control
      extended by edu.neu.ccs.demeterf.control.MutableControl
          extended by edu.neu.ccs.demeterf.control.EdgeBypass
Direct Known Subclasses:
EdgeOnly

public class EdgeBypass
extends MutableControl

Supports the ability to skip/bypass edges while Traversing. Essentially it is a boolean function object:

Boolean bypass(Class, String);
that allows Per-Traversal control. See Traversal for how its used in construction, and Examples for how traversal can be controled to affect computation.


Constructor Summary
EdgeBypass(java.lang.Class<?>... cs)
          Bypass all the edges of the given classes
EdgeBypass(Edge... edges)
           
EdgeBypass(java.lang.String... bypass)
          Takes a String in the format of "Class.edge "+ (meaning more than one).
EdgeBypass(java.lang.String bypass)
           
EdgeBypass(java.lang.String pkg, java.lang.String bypass)
           
 
Method Summary
 EdgeBypass addBuiltIn(java.lang.Class<?> c)
          Adds the given Class as a Builtin
 EdgeBypass addBuiltIns(java.lang.Class<?>... cs)
          Add a Number of Classes to be considered Primitives
 void addBypassing(java.lang.Class<?> c)
          Adds all immediate fields of the given Class to be Bypassed
 void addBypassing(java.lang.Class<?> c, java.lang.String f)
          Adds the given Class/Field to be Bypassed
 void addBypassing(Edge e)
          Adds the given Edge to be Bypassed
 boolean skip(java.lang.Class<?> c, java.lang.String f)
          Returns whether or not to bypass/skip the given Class/Field
 boolean skip(Edge e)
          Returns whether or not to bypass/skip the given Edge
 
Methods inherited from class edu.neu.ccs.demeterf.Control
builtins, bypass, bypass, bypass, bypass, everywhere, isBuiltIn, nowhere, only, only, only, only
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeBypass

public EdgeBypass(Edge... edges)

EdgeBypass

public EdgeBypass(java.lang.Class<?>... cs)
Bypass all the edges of the given classes


EdgeBypass

public EdgeBypass(java.lang.String... bypass)
Takes a String in the format of "Class.edge "+ (meaning more than one). We then attempt to recreate an EdgeBypass with the given edges bypassed. Static methods within Type can be used to extend the path that is used to search for classes.


EdgeBypass

public EdgeBypass(java.lang.String bypass)

EdgeBypass

public EdgeBypass(java.lang.String pkg,
                  java.lang.String bypass)
Method Detail

addBypassing

public void addBypassing(java.lang.Class<?> c,
                         java.lang.String f)
Description copied from class: MutableControl
Adds the given Class/Field to be Bypassed

Specified by:
addBypassing in class MutableControl

addBypassing

public void addBypassing(Edge e)
Description copied from class: MutableControl
Adds the given Edge to be Bypassed

Specified by:
addBypassing in class MutableControl

addBypassing

public void addBypassing(java.lang.Class<?> c)
Description copied from class: MutableControl
Adds all immediate fields of the given Class to be Bypassed

Specified by:
addBypassing in class MutableControl

addBuiltIn

public EdgeBypass addBuiltIn(java.lang.Class<?> c)
Description copied from class: MutableControl
Adds the given Class as a Builtin

Specified by:
addBuiltIn in class MutableControl

addBuiltIns

public EdgeBypass addBuiltIns(java.lang.Class<?>... cs)
Description copied from class: MutableControl
Add a Number of Classes to be considered Primitives

Specified by:
addBuiltIns in class MutableControl

skip

public boolean skip(java.lang.Class<?> c,
                    java.lang.String f)
Description copied from class: Control
Returns whether or not to bypass/skip the given Class/Field

Specified by:
skip in class Control

skip

public boolean skip(Edge e)
Description copied from class: Control
Returns whether or not to bypass/skip the given Edge

Specified by:
skip in class Control