Commit 184cbbfe authored by ISWB Prasetya's avatar ISWB Prasetya
Browse files

tweaking imap and tscope

parent 0ac2f450
......@@ -218,6 +218,7 @@ public class ImplementationMap {
for (Entry<Class,Instantiation> e : knownClasses.entrySet()) {
Class D = e.getKey() ;
if (C == D) continue ;
Instantiation Di = e.getValue() ;
if (C.isAssignableFrom(D)) {
for (Constructor co : Di.directConstructors.allMembers())
......
......@@ -382,6 +382,7 @@ public class TestingScope {
String name = M.getName() ;
if (name.equals(CONSTANTS.classinv_name)
|| name.startsWith("<") // exclude <init> and <clinit>
|| name.startsWith("$jacoco")
)
continue;
if (isVisible(M.getDeclaringClass(),M.getModifiers())) methods.add(M) ;
......
......@@ -11,16 +11,17 @@ public class IncomeTax {
salary = 0 ;
location = "OUTSIDE" ;
}
public IncomeTax(int salary, String location) {
private IncomeTax(int salary, String location, Privy p) {
//if (! (location.equals("INSIDE") || location.equals("OUTSIDE"))) throw new IllegalArgumentException() ;
if (salary<0) throw new IllegalArgumentException() ;
//System.out.println(">> IncomeTax(" + salary + "," + location + ")") ;
System.out.println(">>>>>>>>>>>> IncomeTax(" + salary + "," + location + "," + p + ")" ) ;
this.salary = salary ;
this.location = location ;
}
public int getTax() {
//System.out.println(">>getTax on salary " + salary) ;
if (location.equals("OUTSIDE")) return 0 ;
......
package SomeExamples;
public class Privy {
Privy(int x) {
System.out.println("************* PRIVY!") ;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment