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, EdgeRemove

public class EdgeBypass
extends MutableControl

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

boolean skip(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()
          Bypass all the edges given
EdgeBypass(java.lang.Class<?>... cs)
          Bypass all the edges of the given classes
EdgeBypass(Edge... edges)
          Bypass all the edges given
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
 MutableControl addBypassing(java.lang.Class<?> c)
          Adds all immediate fields of the given Class to be Bypassed
 MutableControl addBypassing(java.lang.Class<?> c, java.lang.String f)
          Adds the given Class/Field to be Bypassed
 MutableControl addBypassing(Edge e)
          Adds the given Edge to be Bypassed
 boolean ignore(java.lang.Class<?> c, java.lang.String f)
          Returns whether or not to bypass/skip the given Class/Field
 boolean ignore(Edge e)
          Returns whether or not to bypass/skip the given Edge
 MutableControl removeBypassing(java.lang.Class<?> c, java.lang.String f)
          Removes the given Class/Field from the Bypassed list
 MutableControl removeBypassing(Edge e)
          Removes the given Edge from the Bypassed list
 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, isBuiltInOld, nowhere, only, only, only, only, remove, remove, remove, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeBypass

public EdgeBypass()
Bypass all the edges given


EdgeBypass

public EdgeBypass(Edge... edges)
Bypass all the edges given


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 MutableControl 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 MutableControl addBypassing(Edge e)
Description copied from class: MutableControl
Adds the given Edge to be Bypassed

Specified by:
addBypassing in class MutableControl

addBypassing

public MutableControl 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

removeBypassing

public MutableControl removeBypassing(java.lang.Class<?> c,
                                      java.lang.String f)
Description copied from class: MutableControl
Removes the given Class/Field from the Bypassed list

Specified by:
removeBypassing in class MutableControl

removeBypassing

public MutableControl removeBypassing(Edge e)
Description copied from class: MutableControl
Removes the given Edge from the Bypassed list

Specified by:
removeBypassing 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

ignore

public boolean ignore(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:
ignore in class Control

ignore

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

Specified by:
ignore in class Control