/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }
/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }
/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }
/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }
/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }
/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }
/** * (Optionally) extracts an {@link Inflector inflector} from a processing stage, * provided the stage implements {@link Inflecting} interface. Otherwise method * returns {@code null}. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param stage a stage to extract the inflector from. * @return extracted inflector if present, {@code null} otherwise. */ @SuppressWarnings("unchecked") public static <DATA, RESULT, T extends Inflector<DATA, RESULT>> T extractInflector(Object stage) { if (stage instanceof Inflecting) { return (T) ((Inflecting<DATA, RESULT>) stage).inflector(); } return null; }