@Nonnull
private static final ThreadLocal<Types> TYPES = new ThreadLocal<Types>();
@Nonnull
public static Types getTypes() {
Types resolved = TYPES.get();
if ( resolved == null ) {
throw new IllegalStateException( "No types object found!" );
}
return resolved;
}