List of usage examples for java.util Collections addAll
@SafeVarargs public static <T> boolean addAll(Collection<? super T> c, T... elements)
From source file:com.linecorp.armeria.server.http.tomcat.TomcatServiceTest.java
@Override protected void configureServer(ServerBuilder sb) throws Exception { super.configureServer(sb); sb.serviceUnder("/jsp/", TomcatServiceBuilder.forCurrentClassPath("tomcat_service").serviceName(SERVICE_NAME) .configurator(s -> Collections.addAll(tomcatServices, s.findServices())).build() .decorate(LoggingService::new)); sb.serviceUnder("/jar/", TomcatServiceBuilder.forClassPath(Future.class) .serviceName("TomcatServiceTest-JAR").build().decorate(LoggingService::new)); sb.serviceUnder("/jar_altroot/", TomcatServiceBuilder.forClassPath(Future.class, "/io/netty/util/concurrent") .serviceName("TomcatServiceTest-JAR-AltRoot").build().decorate(LoggingService::new)); }
From source file:com.smartitengineering.exim.impl.xml.ResourceObjectExporter.java
public ResourceObjectExporter() { Collections.addAll(types, AssociationType.TYPE_OBJECT); }
From source file:goja.initialize.ctxbox.ClassSearcher.java
public ClassSearcher(Class... targets) { this.targets = Lists.newArrayListWithCapacity(targets.length); Collections.addAll(this.targets, targets); }
From source file:com.googlecode.jsonrpc4j.MultipleInvocationListener.java
/** * Creates with the given {@link InvocationListener}s, * {@link #addInvocationListener(InvocationListener)} can be called to * add additional {@link InvocationListener}s. * @param invocationListeners the {@link InvocationListener}s *///from w w w . j a v a 2 s . c o m public MultipleInvocationListener(InvocationListener... invocationListeners) { this.invocationListeners = new LinkedList<InvocationListener>(); Collections.addAll(this.invocationListeners, invocationListeners); }
From source file:com.edmunds.autotest.ClassUtil.java
public static Collection<Method> getAllDeclaredMethods(Class cls) { List<Method> methods = new ArrayList<Method>(); do {/* ww w .j a va 2 s . co m*/ Collections.addAll(methods, cls.getDeclaredMethods()); cls = cls.getSuperclass(); } while (cls != null); return methods; }
From source file:org.codehaus.mojo.hibernate3.processor.ProcessorUtil.java
/** * Supports the retrieval of properties from the maven property. * * @param processorsProperty the property * @return the list containing the synthesized classes *///from w w w .j a va 2 s .co m public static List<Class<? extends GeneratedClassProcessor>> parseProcesssorsFromProperty(String delim, String processorsProperty) throws Throwable { List<Class<? extends GeneratedClassProcessor>> processorClasses = new ArrayList<Class<? extends GeneratedClassProcessor>>(); if (StringUtils.hasText(processorsProperty)) { List<String> arrs = new ArrayList<String>(); if (processorsProperty.contains(delim)) { String[] els = processorsProperty.split(delim); Collections.addAll(arrs, els); } else { arrs.add(processorsProperty); } for (String cn : arrs) { Class<? extends GeneratedClassProcessor> processorClazz = (Class<? extends GeneratedClassProcessor>) Class .forName(cn); processorClasses.add(processorClazz); } } // required for everything else, basically processorClasses.add(RequiredImportProcessor.class); return processorClasses; }
From source file:com.megatome.j2d.support.MatchType.java
MatchType(String typeName, String classSuffix, String... textMatches) { this.typeName = typeName; Collections.addAll(this.matchingText, textMatches); this.classSuffix = classSuffix; }
From source file:com.asakusafw.directio.tools.DirectIoDelete.java
@Override public int run(String[] args) throws Exception { LinkedList<String> argList = new LinkedList<>(); Collections.addAll(argList, args); boolean recursive = false; while (argList.isEmpty() == false) { String arg = argList.removeFirst(); if (arg.equals("-r") || arg.equals("-recursive")) { //$NON-NLS-1$ //$NON-NLS-2$ recursive = true;/*from ww w .java2 s .c o m*/ } else if (arg.equals("--")) { //$NON-NLS-1$ break; } else { argList.addFirst(arg); break; } } if (argList.size() < 2) { LOG.error(MessageFormat.format("Invalid arguments: {0}", Arrays.toString(args))); System.err.println(MessageFormat.format("Usage: hadoop {0} -conf <datasource-conf.xml> [-r] " + "base-path resource-pattern [resource-pattern [...]]", getClass().getName())); return 1; } String path = argList.removeFirst(); List<FilePattern> patterns = new ArrayList<>(); for (String arg : argList) { patterns.add(FilePattern.compile(arg)); } if (repository == null) { repository = HadoopDataSourceUtil.loadRepository(getConf()); } String basePath = repository.getComponentPath(path); DirectDataSource source = repository.getRelatedDataSource(path); for (FilePattern pattern : patterns) { source.delete(basePath, pattern, recursive, new Counter()); } return 0; }
From source file:com.mycsense.carbondb.domain.DimensionSet.java
/** * Construct a new DimensionSet with all the given dimensions. * @param dimensions an undefined number of dimensions *///from w w w . j a v a2 s . c o m public DimensionSet(Dimension... dimensions) { this(); Collections.addAll(this.dimensions, dimensions); }
From source file:io.kahu.hawaii.util.spring.HawaiiControllerExceptionHandler.java
public HawaiiControllerExceptionHandler(LogManager logManager, Class<?>... exceptionsToIgnore) { this.logManager = logManager; if (exceptionsToIgnore != null) { Collections.addAll(this.exceptionsToIgnore, exceptionsToIgnore); }//from w w w . jav a 2s. c o m }