return new Builder(args, validation, strictParsing, true);
return new Builder().fromArgs(args);
/** * Creates and returns an object that implements {@code <T>}. This sets the {@link * ApplicationNameOptions#getAppName() "appName"} to the calling {@link Class#getSimpleName() * classes simple name}. * * <p>Note that {@code <T>} must be composable with every registered interface with this factory. * See {@link PipelineOptionsFactory.Cache#validateWellFormed(Class, Set)} for more details. * * @return An object that implements {@code <T>}. */ public static <T extends PipelineOptions> T as(Class<T> klass) { return new Builder().as(klass); }
/** * After creation we will validate that {@link PipelineOptions} conforms to all the validation * criteria from {@code <T>}. See {@link PipelineOptionsValidator#validate(Class, * PipelineOptions)} for more details about validation. */ public Builder withValidation() { return new Builder(args, true, strictParsing, isCli); }
/** * Creates and returns an object that implements {@link PipelineOptions}. This sets the {@link * ApplicationNameOptions#getAppName() "appName"} to the calling {@link Class#getSimpleName() * classes simple name}. * * @return An object that implements {@link PipelineOptions}. */ public static PipelineOptions create() { return new Builder().as(PipelineOptions.class); }
/** * After creation we will validate that {@code <T>} conforms to all the validation criteria. See * {@link PipelineOptionsValidator#validate(Class, PipelineOptions)} for more details about * validation. */ public Builder withValidation() { return new Builder().withValidation(); }
/** * During parsing of the arguments, we will skip over improperly formatted and unknown * arguments. */ public Builder withoutStrictParsing() { return new Builder(args, validation, false, isCli); }