private static Type lookupAliasedType(jnr.ffi.Runtime runtime, Collection<Annotation> annotations) {
for (Annotation a : annotations) {
TypeDefinition typedef = a.annotationType().getAnnotation(TypeDefinition.class);
if (typedef != null) {
return runtime.findType(typedef.alias());
}
}
return null;
}