{
StringBuilder code = new StringBuilder();
code.append("public interface Intf1 {\n");
code.append("}\n");
resources.add(new StaticJavaResource("Intf1", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public interface Intf2 {\n");
code.append("}\n");
resources.add(new StaticJavaResource("Intf2", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public interface Intf3 {\n");
code.append("}\n");
resources.add(new StaticJavaResource("Intf3", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public class Implements12 implements Intf1, Intf2 {\n");
code.append("}\n");
resources.add(new StaticJavaResource("Implements12", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public class ImplementsNeither {\n");
code.append("}\n");
resources.add(new StaticJavaResource("ImplementsNeither", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public class Sup {\n");
code.append("}\n");
resources.add(new StaticJavaResource("Sup", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public class Sub extends Sup {\n");
code.append("}\n");
resources.add(new StaticJavaResource("Sub", code));
}
{
StringBuilder code = new StringBuilder();
code.append("public class Holder<T> {\n");
code.append(" T x;\n");
code.append("}\n");
resources.add(new StaticJavaResource("Holder", code));
}
TreeLogger logger = createLogger();
TypeOracle to = TypeOracleTestingUtils.buildTypeOracle(logger, resources);
JClassType intf1 = to.getType("Intf1");