JavaCompilerCore/test/finiteClosure/SuperInterfacesTest.java

46 lines
1.0 KiB
Java
Raw Permalink Normal View History

2018-03-21 14:15:31 +00:00
package finiteClosure;
import de.dhbwstuttgart.parser.SyntaxTreeGenerator.FCGenerator;
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
import de.dhbwstuttgart.syntaxtree.factory.ASTFactory;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class SuperInterfacesTest {
@Test
public void test() throws ClassNotFoundException {
Collection<ClassOrInterface> classes = new ArrayList<>();
classes.add(ASTFactory.createClass(TestClass.class));
System.out.println(FCGenerator.toFC(classes));
}
2018-03-21 16:26:43 +00:00
@Test
public void testGeneric() throws ClassNotFoundException {
Collection<ClassOrInterface> classes = new ArrayList<>();
classes.add(ASTFactory.createClass(TestClassGeneric.class));
System.out.println(FCGenerator.toFC(classes));
}
2018-03-21 14:15:31 +00:00
}
class TestClass implements Test2, Test3{
}
2018-03-21 16:26:43 +00:00
class TestClassGeneric<A,B> implements Test4<A>{
}
2018-03-21 14:15:31 +00:00
interface Test2 {
}
interface Test3{
2018-03-21 16:26:43 +00:00
}
interface Test4<A>{
2018-03-21 14:15:31 +00:00
}