// 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) {
}
// 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())) {
// 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) {
}
// 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++) {
// 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];
// 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) {