use of java.util.Enumeration in project XobotOS by xamarin.
the class LazyDERSequence method parse.
private void parse() {
Enumeration en = new LazyDERConstructionEnumeration(encoded);
while (en.hasMoreElements()) {
addObject((DEREncodable) en.nextElement());
}
parsed = true;
}
use of java.util.Enumeration in project hibernate-orm by hibernate.
the class LogHelper method logPersistenceUnitInformation.
public static void logPersistenceUnitInformation(PersistenceUnitDescriptor descriptor) {
if (!log.isDebugEnabled()) {
log.processingPersistenceUnitInfoName(descriptor.getName());
return;
}
StringBuilder sb = new StringBuilder();
sb.append("PersistenceUnitInfo [\n\t").append("name: ").append(descriptor.getName()).append("\n\t").append("persistence provider classname: ").append(descriptor.getProviderClassName()).append("\n\t").append("classloader: ").append(descriptor.getClassLoader()).append("\n\t").append("excludeUnlistedClasses: ").append(descriptor.isExcludeUnlistedClasses()).append("\n\t").append("JTA datasource: ").append(descriptor.getJtaDataSource()).append("\n\t").append("Non JTA datasource: ").append(descriptor.getNonJtaDataSource()).append("\n\t").append("Transaction type: ").append(descriptor.getTransactionType()).append("\n\t").append("PU root URL: ").append(descriptor.getPersistenceUnitRootUrl()).append("\n\t").append("Shared Cache Mode: ").append(descriptor.getSharedCacheMode()).append("\n\t").append("Validation Mode: ").append(descriptor.getValidationMode()).append("\n\t");
sb.append("Jar files URLs [");
List<URL> jarFileUrls = descriptor.getJarFileUrls();
if (jarFileUrls != null) {
for (URL url : jarFileUrls) {
sb.append("\n\t\t").append(url);
}
}
sb.append("]\n\t");
sb.append("Managed classes names [");
List<String> classNames = descriptor.getManagedClassNames();
if (classNames != null) {
for (String className : classNames) {
sb.append("\n\t\t").append(className);
}
}
sb.append("]\n\t");
sb.append("Mapping files names [");
List<String> mappingFiles = descriptor.getMappingFileNames();
if (mappingFiles != null) {
for (String file : mappingFiles) {
sb.append("\n\t\t").append(file);
}
}
sb.append("]\n\t");
sb.append("Properties [");
Properties properties = descriptor.getProperties();
if (properties != null) {
Enumeration names = properties.propertyNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
sb.append("\n\t\t").append(name).append(": ").append(properties.getProperty(name));
}
}
sb.append("]");
log.debug(sb.toString());
}
use of java.util.Enumeration in project powermock by powermock.
the class JUnit3TestSuiteChunkerImpl method tests.
public Enumeration<?> tests() {
final List<Object> tests = new LinkedList<Object>();
for (PowerMockJUnit3RunnerDelegate delegate : delegates) {
final Enumeration<?> delegateTests = delegate.tests();
while (delegateTests.hasMoreElements()) {
tests.add(delegateTests.nextElement());
}
}
Enumeration<?> allTests = new Enumeration<Object>() {
private volatile int count = 0;
public boolean hasMoreElements() {
return count != tests.size();
}
public Object nextElement() {
return tests.get(count++);
}
};
return allTests;
}
use of java.util.Enumeration in project camel by apache.
the class CamelKarafTestSupport method explode.
/*
* Explode the dictionary into a ,-delimited list of key=value pairs
*/
private static String explode(Dictionary dictionary) {
Enumeration keys = dictionary.keys();
StringBuilder sb = new StringBuilder();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
sb.append(String.format("%s=%s", key, dictionary.get(key)));
if (keys.hasMoreElements()) {
sb.append(", ");
}
}
return sb.toString();
}
use of java.util.Enumeration in project cassandra by apache.
the class CassandraXMLJUnitResultFormatter method startTestSuite.
/**
* The whole testsuite started.
* @param suite the testsuite.
*/
public void startTestSuite(final JUnitTest suite) {
doc = getDocumentBuilder().newDocument();
rootElement = doc.createElement(TESTSUITE);
String n = suite.getName();
// if (n != null && !tag.isEmpty())
// n = n + "-" + tag;
rootElement.setAttribute(ATTR_NAME, n == null ? UNKNOWN : n);
//add the timestamp
final String timestamp = DateUtils.format(new Date(), DateUtils.ISO8601_DATETIME_PATTERN);
rootElement.setAttribute(TIMESTAMP, timestamp);
//and the hostname.
rootElement.setAttribute(HOSTNAME, getHostname());
// Output properties
final Element propsElement = doc.createElement(PROPERTIES);
rootElement.appendChild(propsElement);
final Properties props = suite.getProperties();
if (props != null) {
final Enumeration e = props.propertyNames();
while (e.hasMoreElements()) {
final String name = (String) e.nextElement();
final Element propElement = doc.createElement(PROPERTY);
propElement.setAttribute(ATTR_NAME, name);
propElement.setAttribute(ATTR_VALUE, props.getProperty(name));
propsElement.appendChild(propElement);
}
}
}
Aggregations