aboutsummaryrefslogtreecommitdiffstats
path: root/weaver5
diff options
context:
space:
mode:
authoraclement <aclement>2008-05-28 23:54:05 +0000
committeraclement <aclement>2008-05-28 23:54:05 +0000
commit91109eab15f47311489b5028aea3f1fc056b1d41 (patch)
tree2c2a9ab0f8076d51219aecad130353b9ea0ac6d8 /weaver5
parent3259086920e238f5106a7534c16800b91eabcfb8 (diff)
downloadaspectj-91109eab15f47311489b5028aea3f1fc056b1d41.tar.gz
aspectj-91109eab15f47311489b5028aea3f1fc056b1d41.zip
231396: Comment #4: Big Refactoring
Diffstat (limited to 'weaver5')
-rw-r--r--weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
index c5f0b62f3..47f70c366 100644
--- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
+++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
@@ -112,7 +112,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
// memory.
try {
JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass());
- org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0];
+ org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[] anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0];
if (onMember instanceof Method) {
org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember);
if (bcelMethod == null) {
@@ -130,7 +130,8 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
}
// the answer is cached and we don't want to hold on to memory
bcelRepository.clear();
- if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0];
+ // OPTIMIZE make constant 0 size array for sharing
+ if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0];
// convert to our Annotation type
for (int i=0;i<anns.length;i++) {
if (anns[i].getTypeSignature().equals(ofType.getSignature())) {
@@ -180,7 +181,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
// memory.
try {
JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass());
- org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0];
+ org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[] anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0];
if (onMember instanceof Method) {
org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember);
if (bcelMethod == null) {
@@ -198,7 +199,8 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
}
// the answer is cached and we don't want to hold on to memory
bcelRepository.clear();
- if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0];
+ // OPTIMIZE make this a constant 0 size array
+ if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0];
// convert to our Annotation type
Set<ResolvedType> annSet = new HashSet<ResolvedType>();
for (int i = 0; i < anns.length; i++) {
@@ -225,7 +227,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
// memory.
try {
JavaClass jc = bcelRepository.loadClass(forClass);
- org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns =jc.getAnnotations();
+ org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[] anns =jc.getAnnotations();
bcelRepository.clear();
if (anns == null) return new ResolvedType[0];
ResolvedType[] ret = new ResolvedType[anns.length];
@@ -293,7 +295,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
// memory.
try {
JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass());
- org.aspectj.apache.bcel.classfile.annotation.Annotation[][] anns = null;
+ org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[][] anns = null;
if (onMember instanceof Method) {
org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember);
if (bcelMethod == null) {