]> source.dussan.org Git - aspectj.git/commitdiff
246125: move bcel dependent type to bcel package
authoraclement <aclement>
Fri, 5 Sep 2008 21:23:17 +0000 (21:23 +0000)
committeraclement <aclement>
Fri, 5 Sep 2008 21:23:17 +0000 (21:23 +0000)
weaver/src/org/aspectj/weaver/FakeAnnotation.java [deleted file]
weaver/src/org/aspectj/weaver/bcel/FakeAnnotation.java [new file with mode: 0644]

diff --git a/weaver/src/org/aspectj/weaver/FakeAnnotation.java b/weaver/src/org/aspectj/weaver/FakeAnnotation.java
deleted file mode 100644 (file)
index c908e3c..0000000
+++ /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 (file)
index 0000000..3311398
--- /dev/null
@@ -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;
+       }
+}