stephanenicolas / boundbox

BoundBox provides an easy way to test an object by accessing all its fields, constructor and methods, public or not. BoundBox breaks encapsulation.
229 stars 19 forks source link

Replace all unvisible types by Object #15

Closed stephanenicolas closed 11 years ago

stephanenicolas commented 11 years ago

When processing a class, it can internally use types that may not be visible in the boundbox scope or in its clients scope.

In that case , the type should be replaced by Object.

stephanenicolas commented 11 years ago

The visitor inside the BoundBoxScanner should take into account the visibility of the types it visits :

TODO :

Typical example :

public class A {
    private class B {}
    B foo();
}

A.B is not visible from BoundBoxOfA, the signature of BoundBoxOfA.foo() should be :

 public Object foo()