Created
November 11, 2015 13:57
-
-
Save fhueske/6c5aa386fc79ab69712b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get TypeInformation | |
TypeInformation pType = TypeExtractor.createTypeInfo(ProtocolEvent.class); | |
// print TypeInformation | |
printTypeInfo(pType); | |
// prints the type information recursively | |
public static void printTypeInfo(TypeInformation t) { | |
System.out.println(t.getClass() + " : " + t.getTypeClass()); | |
if(t instanceof CompositeType) { | |
System.out.println("("); | |
for(int i=0; i<t.getArity(); i++) { | |
printTypeInfo(((CompositeType) t).getTypeAt(i)); | |
} | |
System.out.println(")"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment