private StringBuffer namespace;
private IWeavingContext weavingContext;
- private List concreteAspects = new ArrayList();
+ private List<ConcreteAspectCodeGen> concreteAspects = new ArrayList<ConcreteAspectCodeGen>();
private static Trace trace = TraceFactory.getTraceFactory().getTrace(ClassLoaderWeavingAdaptor.class);
definitions.add(DocumentParser.parse(xml));
seenBefore.add(xml);
} else {
- warn("ignoring duplicate definition: " + xml);
+ debug("ignoring duplicate definition: " + xml);
}
}
}
* @param loader
* @param definitions
*/
- private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
+ private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) {
StringBuffer allOptions = new StringBuffer();
- for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
- Definition definition = (Definition) iterator.next();
+ for (Definition definition : definitions) {
allOptions.append(definition.getWeaverOptions()).append(' ');
}
}
boolean success = true;
- for (Iterator iterator = concreteAspects.iterator(); iterator.hasNext();) {
- ConcreteAspectCodeGen gen = (ConcreteAspectCodeGen) iterator.next();
+ for (ConcreteAspectCodeGen gen : concreteAspects) {
String name = gen.getClassName();
byte[] bytes = gen.getBytes();
* @param loader
* @param definitions
*/
- private void registerIncludeExclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
+ private void registerIncludeExclude(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) {
String fastMatchInfo = null;
- for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
- Definition definition = (Definition) iterator.next();
- for (Iterator iterator1 = definition.getIncludePatterns().iterator(); iterator1.hasNext();) {
+ for (Definition definition : definitions) {
+ for (Iterator<String> iterator1 = definition.getIncludePatterns().iterator(); iterator1.hasNext();) {
hasIncludes = true;
- String include = (String) iterator1.next();
+ String include = iterator1.next();
fastMatchInfo = looksLikeStartsWith(include);
if (fastMatchInfo != null) {
m_includeStartsWith.add(fastMatchInfo);
includeTypePattern.add(includePattern);
}
}
- for (Iterator iterator1 = definition.getExcludePatterns().iterator(); iterator1.hasNext();) {
+ for (Iterator<String> iterator1 = definition.getExcludePatterns().iterator(); iterator1.hasNext();) {
hasExcludes = true;
- String exclude = (String) iterator1.next();
+ String exclude = iterator1.next();
fastMatchInfo = looksLikeStartsWith(exclude);
if (fastMatchInfo != null) {
excludeStartsWith.add(fastMatchInfo);
* @param loader
* @param definitions
*/
- private void registerDump(final BcelWeaver weaver, final ClassLoader loader, final List definitions) {
- for (Iterator iterator = definitions.iterator(); iterator.hasNext();) {
- Definition definition = (Definition) iterator.next();
- for (Iterator iterator1 = definition.getDumpPatterns().iterator(); iterator1.hasNext();) {
- String dump = (String) iterator1.next();
+ private void registerDump(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) {
+ for (Definition definition : definitions) {
+ for (Iterator<String> iterator1 = definition.getDumpPatterns().iterator(); iterator1.hasNext();) {
+ String dump = iterator1.next();
TypePattern pattern = new PatternParser(dump).parseTypePattern();
m_dumpTypePattern.add(pattern);
}