From: aclement Date: Fri, 5 Sep 2008 21:23:17 +0000 (+0000) Subject: 246125: move bcel dependent type to bcel package X-Git-Tag: V1_6_2~90 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=258199d4cc361a86daee02fb68a7f0fefd8a9a02;p=aspectj.git 246125: move bcel dependent type to bcel package --- diff --git a/weaver/src/org/aspectj/weaver/FakeAnnotation.java b/weaver/src/org/aspectj/weaver/FakeAnnotation.java deleted file mode 100644 index c908e3cd5..000000000 --- a/weaver/src/org/aspectj/weaver/FakeAnnotation.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 Contributors. - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://eclipse.org/legal/epl-v10.html - * - * Contributors: - * initial implementation Andy Clement - *******************************************************************************/ -package org.aspectj.weaver; - -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.List; - -import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; -import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePairGen; - -/** - * For implementing declare @type interacting with declare @parents during compilation - we need to be - * able to add an annotation to 'binary type binding' (this is how types are seen during incremental compilation). - * Unlike a SourceTypeBinding - a BinaryTypeBinding does not allow easy interaction with its annotations - - * so what we do is take the eclipse annotation, suck out the name/signature and visibility and put that information - * in a 'FakeAnnotation'. The FakeAnnotation is attached to the BCEL delegate for the binary type binding - - * this will allow type resolution to succeed correctly. The FakeAnnotation never makes it to disk, since the weaver - * does the job properly, attaching a real annotation. - */ -public class FakeAnnotation extends AnnotationGen { - - private String name; - private String sig; - private boolean isRuntimeVisible; - - public FakeAnnotation(String name,String sig,boolean isRuntimeVisible) { - super(null,null,true,null); - this.name = name; - this.sig = sig; - this.isRuntimeVisible = isRuntimeVisible; - } - - public String getTypeName() { - return name; - } - - public String getTypeSignature() { - return sig; - } - - public void addElementNameValuePair(ElementNameValuePairGen evp) { - // doesnt need to know about name/value pairs - } - - public void dump(DataOutputStream dos) throws IOException { - // should be serialized - } - - public int getTypeIndex() { - return 0; - } - - public List getValues() { - return null; - } - - public boolean isRuntimeVisible() { - return isRuntimeVisible; - } - - protected void setIsRuntimeVisible(boolean b) { - } - - public String toShortString() { - return "@"+this.name; - } - - public String toString() { - return this.name; - } -} diff --git a/weaver/src/org/aspectj/weaver/bcel/FakeAnnotation.java b/weaver/src/org/aspectj/weaver/bcel/FakeAnnotation.java new file mode 100644 index 000000000..331139893 --- /dev/null +++ b/weaver/src/org/aspectj/weaver/bcel/FakeAnnotation.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright (c) 2005 Contributors. + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://eclipse.org/legal/epl-v10.html + * + * Contributors: + * initial implementation Andy Clement + *******************************************************************************/ +package org.aspectj.weaver.bcel; + +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.List; + +import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen; +import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePairGen; + +/** + * For implementing declare @type interacting with declare @parents during compilation - we need to be + * able to add an annotation to 'binary type binding' (this is how types are seen during incremental compilation). + * Unlike a SourceTypeBinding - a BinaryTypeBinding does not allow easy interaction with its annotations - + * so what we do is take the eclipse annotation, suck out the name/signature and visibility and put that information + * in a 'FakeAnnotation'. The FakeAnnotation is attached to the BCEL delegate for the binary type binding - + * this will allow type resolution to succeed correctly. The FakeAnnotation never makes it to disk, since the weaver + * does the job properly, attaching a real annotation. + */ +public class FakeAnnotation extends AnnotationGen { + + private String name; + private String sig; + private boolean isRuntimeVisible; + + public FakeAnnotation(String name,String sig,boolean isRuntimeVisible) { + super(null,null,true,null); + this.name = name; + this.sig = sig; + this.isRuntimeVisible = isRuntimeVisible; + } + + public String getTypeName() { + return name; + } + + public String getTypeSignature() { + return sig; + } + + public void addElementNameValuePair(ElementNameValuePairGen evp) { + // doesnt need to know about name/value pairs + } + + public void dump(DataOutputStream dos) throws IOException { + // should be serialized + } + + public int getTypeIndex() { + return 0; + } + + public List getValues() { + return null; + } + + public boolean isRuntimeVisible() { + return isRuntimeVisible; + } + + protected void setIsRuntimeVisible(boolean b) { + } + + public String toShortString() { + return "@"+this.name; + } + + public String toString() { + return this.name; + } +}