public Builder forApplications(Path first, Path... theRest) { checkUnset(applications, "applications"); ImmutableList<Path> paths = ImmutableList.<Path>builder().add(first).add(theRest).build(); this.applications = NonNullableField.<List<Path>>of(paths); return this; }
public OneStopShop build() { checkSet(this.jaxRsClassesRoot, "classes root"); checkSet(this.ramlOutputFile, "raml output file"); checkSet(this.ramlConfiguration, "raml configuration"); Path classesRoot = jaxRsClassesRoot.get(); checkArgument(Files.isDirectory(classesRoot), "classes root %s is not a valid directory", classesRoot); if (sourceCodeRoot.isSet()) { Path path = sourceCodeRoot.get(); checkArgument(Files.isDirectory(path), "source code root %s is not a valid directory", path); } return OneStopShop.create(classesRoot, this.ramlOutputFile.get(), this.sourceCodeRoot, this.ramlConfiguration.get()); }
public JerseyGatherer build() { checkSet(applications, "applications"); ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.files(true, FluentIterable.from(this.applications.get()).transform(new Function<Path, String>() { @Nullable @Override public String apply(@Nullable Path path) { return path.toString(); } }).toArray(String.class)); if (classLoader.isSet()) { resourceConfig.setClassLoader(classLoader.get()); } return create(resourceConfig); }
public Builder withClassLoader(ClassLoader classLoader) { checkUnset(this.classLoader, "class loader"); this.classLoader = NonNullableField.of(classLoader); return this; }
public JerseyGatherer build() { checkSet(applications, "applications"); ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.files(true, FluentIterable.from(this.applications.get()).transform(new Function<Path, String>() { @Nullable @Override public String apply(@Nullable Path path) { return path.toString(); } }).toArray(String.class)); if (classLoader.isSet()) { resourceConfig.setClassLoader(classLoader.get()); } return create(resourceConfig); }
public Builder withSourceCodeRoot(Path sourceCodeRoot) { checkUnset(this.sourceCodeRoot, "source code root"); this.sourceCodeRoot = NonNullableField.of(sourceCodeRoot); return this; }
public JerseyGatherer build() { checkSet(applications, "applications"); ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.files(true, FluentIterable.from(this.applications.get()).transform(new Function<Path, String>() { @Nullable @Override public String apply(@Nullable Path path) { return path.toString(); } }).toArray(String.class)); if (classLoader.isSet()) { resourceConfig.setClassLoader(classLoader.get()); } return create(resourceConfig); }
public Builder withClassLoader(ClassLoader classLoader) { checkUnset(this.classLoader, "class loader"); this.classLoader = NonNullableField.of(classLoader); return this; }
public Builder withClassLoader(ClassLoader classLoader) { checkUnset(this.classLoader, "class loader"); this.classLoader = NonNullableField.of(classLoader); return this; }
public Builder withJaxRsClassesRoot(Path jaxRsClassesRoot) { checkUnset(this.jaxRsClassesRoot, "classes root"); this.jaxRsClassesRoot = NonNullableField.of(jaxRsClassesRoot); return this; }
public Builder forApplications(Path first, Path... theRest) { checkUnset(applications, "applications"); ImmutableList<Path> paths = ImmutableList.<Path>builder().add(first).add(theRest).build(); this.applications = NonNullableField.<List<Path>>of(paths); return this; }
public Builder withRamlOutputFile(Path ramlOutputFile) { checkUnset(this.ramlOutputFile, "raml output file"); this.ramlOutputFile = NonNullableField.of(ramlOutputFile); return this; }
public Builder withRamlConfiguration(RamlConfiguration ramlConfiguration) { checkUnset(this.ramlConfiguration, "raml configuration"); this.ramlConfiguration = NonNullableField.of(ramlConfiguration); return this; }
public Builder forApplications(Path first, Path... theRest) { checkUnset(applications, "applications"); ImmutableList<Path> paths = ImmutableList.<Path>builder().add(first).add(theRest).build(); this.applications = NonNullableField.<List<Path>>of(paths); return this; }