JavaTXCompilerInJavaTX/test/astfactory/ASTFactoryTest.java
Martin Plümicke fcca50ed78 modified: .classpath
modified:   src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java
	modified:   src/de/dhbwstuttgart/syntaxtree/SourceFile.java
	modified:   src/de/dhbwstuttgart/syntaxtree/statement/LambdaExpression.java
	modified:   src/de/dhbwstuttgart/typecheck/GenericTypeName.java
	modified:   src/de/dhbwstuttgart/typeinference/typeAlgo/TYPE.java
	modified:   test/astfactory/ASTFactoryTest.java

imports auskommentiert
2017-06-13 17:38:43 +02:00

22 lines
712 B
Java

package astfactory;
//import javafx.collections.ObservableList;
import org.junit.Test;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.Arrays;
import java.util.HashMap;
import static org.junit.Assert.*;
public class ASTFactoryTest<A> extends HashMap<String, A>{
@Test
public void test(){
System.out.println((this.getClass().getGenericSuperclass()));
Type[] arguments = ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments();
System.out.println(Arrays.toString(arguments));
System.out.println(((TypeVariable)arguments[1]).getGenericDeclaration());
}
}