Skip to content

Instantly share code, notes, and snippets.

@fhueske
Created November 11, 2015 13:57
Show Gist options
  • Save fhueske/6c5aa386fc79ab69712b to your computer and use it in GitHub Desktop.
Save fhueske/6c5aa386fc79ab69712b to your computer and use it in GitHub Desktop.
// 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