From 87e7258c9adc8af6e68ad07d84ae355b3d9edd6b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 9 Sep 2010 22:14:36 +0000 Subject: [PATCH] polishing --- .../AnnotationMetadataReadingVisitor.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java index f7b31f7b5f4..311955368d1 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java +++ b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,6 +54,7 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor private final MultiValueMap methodMetadataMap = new LinkedMultiValueMap(); + public AnnotationMetadataReadingVisitor(ClassLoader classLoader) { this.classLoader = classLoader; } @@ -61,7 +62,7 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - return new MethodMetadataReadingVisitor(name, access, this.getClassName(), this.classLoader, methodMetadataMap); + return new MethodMetadataReadingVisitor(name, access, this.getClassName(), this.classLoader, this.methodMetadataMap); } @Override @@ -134,11 +135,11 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor } public boolean hasAnnotatedMethods(String annotationType) { - return methodMetadataMap.containsKey(annotationType); + return this.methodMetadataMap.containsKey(annotationType); } public Set getAnnotatedMethods(String annotationType) { - List list = methodMetadataMap.get(annotationType); + List list = this.methodMetadataMap.get(annotationType); if (CollectionUtils.isEmpty(list)) { return new LinkedHashSet(0); } @@ -146,4 +147,5 @@ final class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor annotatedMethods.addAll(list); return annotatedMethods; } -} \ No newline at end of file + +}