public <T extends Enum<T>> Set<T> getAll(String property, Class<T> enumType) { return getAll(property, Collections.EMPTY_SET, enumType); }
public <T extends Enum<T>> Set<T> getAll(final String property, final Class<T> enumType) { return getAll(property, Collections.EMPTY_SET, enumType); }
public <T extends Enum<T>> Set<T> getAll(final String property, final Class<T> enumType) { return getAll(property, Collections.EMPTY_SET, enumType); }
public <T extends Enum<T>> Set<T> getAll(final String property, final T... defaultValue) { final EnumSet<T> defaults = EnumSet.copyOf(Arrays.asList(defaultValue)); return getAll(property, defaults); }
public <T extends Enum<T>> Set<T> getAll(String property, T... defaultValue) { EnumSet<T> defaults = EnumSet.copyOf(Arrays.asList(defaultValue)); return getAll(property, defaults); }
public <T extends Enum<T>> Set<T> getAll(final String property, final T... defaultValue) { final EnumSet<T> defaults = EnumSet.copyOf(Arrays.asList(defaultValue)); return getAll(property, defaults); }
public <T extends Enum<T>> Set<T> getAll(String property, Set<T> defaultValue) { Class<T> enumType; try { T t = defaultValue.iterator().next(); enumType = (Class<T>) t.getClass(); } catch (Exception e) { throw new IllegalArgumentException("Must supply a default for property " + property); } return getAll(property, defaultValue, enumType); }
public <T extends Enum<T>> Set<T> getAll(final String property, final Set<T> defaultValue) { final Class<T> enumType; try { final T t = defaultValue.iterator().next(); enumType = (Class<T>) t.getClass(); } catch (final Exception e) { throw new IllegalArgumentException("Must supply a default for property " + property); } return getAll(property, defaultValue, enumType); }
public <T extends Enum<T>> Set<T> getAll(final String property, final Set<T> defaultValue) { final Class<T> enumType; try { final T t = defaultValue.iterator().next(); enumType = (Class<T>) t.getClass(); } catch (final Exception e) { throw new IllegalArgumentException("Must supply a default for property " + property); } return getAll(property, defaultValue, enumType); }
public TempClassLoader(final ClassLoader parent) { super(EMPTY_URLS, parent); this.skip = SystemInstance.get().getOptions().getAll("openejb.tempclassloader.skip", Skip.NONE); this.system = ClassLoader.getSystemClassLoader(); this.embedded = this.getClass().getClassLoader() == this.system; this.parentURLClassLoader = URLClassLoader.class.isInstance(parent); }
public TempClassLoader(final ClassLoader parent) { super(new URL[0], parent); this.skip = SystemInstance.get().getOptions().getAll("openejb.tempclassloader.skip", Skip.NONE); this.system = ClassLoader.getSystemClassLoader(); this.embedded = this.getClass().getClassLoader() == this.system; }
public EventTempClassLoader(final ClassLoader parent) { super(new URL[0], parent); this.skip = SystemInstance.get().getOptions().getAll("openejb.tempclassloader.skip", Skip.NONE); this.system = ClassLoader.getSystemClassLoader(); this.embedded = this.getClass().getClassLoader() == this.system; }
public TempClassLoader(ClassLoader parent) { super(new URL[0], parent); Options options = SystemInstance.get().getOptions(); skip = options.getAll("openejb.tempclassloader.skip", Skip.NONE); }
@Override public void init(final Properties props) throws Exception { final Options options = new Options(props); options.setLogger(new OptionsLog(log)); print = options.getAll("print", OpenEJBHttpServer.Output.class); indent = print.size() > 0 && options.get("indent.xml", false); debugPayload = "true".equalsIgnoreCase(props.getProperty("debugPayload", "true")); }
protected <T extends Enum<T>> Set<T> getAll(String property, Set<T> defaultValue, Class<T> enumType) { String value = properties.getProperty(property); if (value == null) return parent.getAll(property, defaultValue, enumType); // Shorthand for specifying ALL or NONE for any option // that allows for multiple values of the enum if ("all".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value)) { log(property, value); return EnumSet.allOf(enumType); } else if ("none".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value)) { log(property, value); return EnumSet.noneOf(enumType); } try { String[] values = value.split(","); EnumSet<T> set = EnumSet.noneOf(enumType); for (String s : values) { s = s.trim(); set.add(valueOf(enumType, s.toUpperCase())); } return logAll(property, set); } catch (IllegalArgumentException e) { warn(property, value); return parent.getAll(property, defaultValue, enumType); } }
protected <T extends Enum<T>> Set<T> getAll(final String property, final Set<T> defaultValue, final Class<T> enumType) { final String value = properties.getProperty(property); if (value == null || value.equals("")) { return parent.getAll(property, defaultValue, enumType); } // Shorthand for specifying ALL or NONE for any option // that allows for multiple values of the enum if ("all".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value)) { log(property, value); return EnumSet.allOf(enumType); } else if ("none".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value)) { log(property, value); return EnumSet.noneOf(enumType); } try { final String[] values = value.split(","); final EnumSet<T> set = EnumSet.noneOf(enumType); for (String s : values) { s = s.trim(); set.add(valueOf(enumType, s.toUpperCase())); } return logAll(property, set); } catch (final IllegalArgumentException e) { warn(property, value); return parent.getAll(property, defaultValue, enumType); } }
protected <T extends Enum<T>> Set<T> getAll(final String property, final Set<T> defaultValue, final Class<T> enumType) { final String value = properties.getProperty(property); if (value == null || value.equals("")) { return parent.getAll(property, defaultValue, enumType); } // Shorthand for specifying ALL or NONE for any option // that allows for multiple values of the enum if ("all".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value)) { log(property, value); return EnumSet.allOf(enumType); } else if ("none".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value)) { log(property, value); return EnumSet.noneOf(enumType); } try { final String[] values = value.split(","); final EnumSet<T> set = EnumSet.noneOf(enumType); for (String s : values) { s = s.trim(); set.add(valueOf(enumType, s.toUpperCase())); } return logAll(property, set); } catch (final IllegalArgumentException e) { warn(property, value); return parent.getAll(property, defaultValue, enumType); } }
@Override public void init(final Properties props) throws Exception { final Options options = new Options(props); options.setLogger(new OptionsLog(log)); print = options.getAll("print", OpenEJBHttpServer.Output.class); indent = print.size() > 0 && options.get("" + "" + ".xml", false); countStreams = options.get("stream.count", false); }
public ClasspathSearcher() { final Options options = SystemInstance.get().getOptions(); include = options.get(CLASSPATH_INCLUDE, ".*"); exclude = options.get(CLASSPATH_EXCLUDE, ""); filterSystemApps = options.get(CLASSPATH_FILTER_SYSTEMAPPS, true); requireDescriptors = options.getAll(CLASSPATH_REQUIRE_DESCRIPTOR, RequireDescriptors.CLIENT); filterDescriptors = options.get(CLASSPATH_FILTER_DESCRIPTORS, false); }
Set<Vendor> support = SystemInstance.get().getOptions().getAll("openejb.vendor.config", Vendor.values());