Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java Sun Jun 4 08:52:18 2006
@@ -1,76 +1,76 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents one parameter annotation in the parameter annotation table
- *
- * @version $Id: ParameterAnnotationEntry
- * @author <A HREF="mailto:[email protected]">D. Brosius</A>
- * @since 5.2
- */
-public class ParameterAnnotationEntry implements Node, Constants {
-
- private int annotation_table_length;
- private AnnotationEntry[] annotation_table;
-
-
- /**
- * Construct object from file stream.
- * @param file Input stream
- * @throws IOException
- */
- ParameterAnnotationEntry(DataInputStream file, ConstantPool constant_pool) throws IOException {
- annotation_table_length = (file.readUnsignedShort());
- annotation_table = new AnnotationEntry[annotation_table_length];
- for (int i = 0; i < annotation_table_length; i++) {
- annotation_table[i] = new AnnotationEntry(file, constant_pool);
- }
- }
-
-
- /**
- * Called by objects that are traversing the nodes of the tree implicitely
- * defined by the contents of a Java class. I.e., the hierarchy of methods,
- * fields, attributes, etc. spawns a tree of objects.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- // v.visitParameterAnnotationEntry(this);
- }
-
-
- /**
- * @return the number of annotation entries in this parameter annotation
- */
- public final int getNumAnnotations() {
- return annotation_table_length;
- }
-
-
- /**
- * returns the array of annotation entries in this annotation
- */
- public AnnotationEntry[] getAnnotationEntries() {
- return annotation_table;
- }
-}
+/*
+ * Copyright 2000-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.bcel.classfile;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import org.apache.bcel.Constants;
+
+/**
+ * represents one parameter annotation in the parameter annotation table
+ *
+ * @version $Id: ParameterAnnotationEntry
+ * @author <A HREF="mailto:[email protected]">D. Brosius</A>
+ * @since 5.2
+ */
+public class ParameterAnnotationEntry implements Node, Constants {
+
+ private int annotation_table_length;
+ private AnnotationEntry[] annotation_table;
+
+
+ /**
+ * Construct object from file stream.
+ * @param file Input stream
+ * @throws IOException
+ */
+ ParameterAnnotationEntry(DataInputStream file, ConstantPool constant_pool) throws IOException {
+ annotation_table_length = (file.readUnsignedShort());
+ annotation_table = new AnnotationEntry[annotation_table_length];
+ for (int i = 0; i < annotation_table_length; i++) {
+ annotation_table[i] = new AnnotationEntry(file, constant_pool);
+ }
+ }
+
+
+ /**
+ * Called by objects that are traversing the nodes of the tree implicitely
+ * defined by the contents of a Java class. I.e., the hierarchy of methods,
+ * fields, attributes, etc. spawns a tree of objects.
+ *
+ * @param v Visitor object
+ */
+ public void accept( Visitor v ) {
+ // v.visitParameterAnnotationEntry(this);
+ }
+
+
+ /**
+ * @return the number of annotation entries in this parameter annotation
+ */
+ public final int getNumAnnotations() {
+ return annotation_table_length;
+ }
+
+
+ /**
+ * returns the array of annotation entries in this annotation
+ */
+ public AnnotationEntry[] getAnnotationEntries() {
+ return annotation_table;
+ }
+}
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java Sun Jun 4 08:52:18 2006
@@ -1,114 +1,114 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-
-/**
- * base class for parameter annotations
- *
- * @version $Id: ParameterAnnotations
- * @author <A HREF="mailto:[email protected]">D. Brosius</A>
- * @since 5.2
- */
-public abstract class ParameterAnnotations extends Attribute {
-
- private int num_parameters;
- private ParameterAnnotationEntry[] parameter_annotation_table; // Table of parameter annotations
-
-
- /**
- * @param parameter_annotation_type the subclass type of the parameter annotation
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param file Input stream
- * @param constant_pool Array of constants
- */
- ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
- DataInputStream file, ConstantPool constant_pool) throws IOException {
- this(parameter_annotation_type, name_index, length, (ParameterAnnotationEntry[]) null,
- constant_pool);
- num_parameters = (file.readUnsignedByte());
- parameter_annotation_table = new ParameterAnnotationEntry[num_parameters];
- for (int i = 0; i < num_parameters; i++) {
- parameter_annotation_table[i] = new ParameterAnnotationEntry(file, constant_pool);
- }
- }
-
-
- /**
- * @param parameter_annotation_type the subclass type of the parameter annotation
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param parameter_annotation_table the actual parameter annotations
- * @param constant_pool Array of constants
- */
- public ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
- ParameterAnnotationEntry[] parameter_annotation_table, ConstantPool constant_pool) {
- super(parameter_annotation_type, name_index, length, constant_pool);
- setParameterAnnotationTable(parameter_annotation_table);
- }
-
-
- /**
- * Called by objects that are traversing the nodes of the tree implicitely
- * defined by the contents of a Java class. I.e., the hierarchy of methods,
- * fields, attributes, etc. spawns a tree of objects.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- // v.visitParameterAnnotation(this);
- }
-
-
- /**
- * @param parameter_annotation_table the entries to set in this parameter annotation
- */
- public final void setParameterAnnotationTable(
- ParameterAnnotationEntry[] parameter_annotation_table ) {
- this.parameter_annotation_table = parameter_annotation_table;
- num_parameters = (parameter_annotation_table == null)
- ? 0
- : parameter_annotation_table.length;
- }
-
-
- /**
- * @return the parameter annotation entry table
- */
- public final ParameterAnnotationEntry[] getParameterAnnotationTable() {
- return parameter_annotation_table;
- }
-
-
- /**
- * returns the array of parameter annotation entries in this parameter annotation
- */
- public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
- return parameter_annotation_table;
- }
-
-
- /**
- * @return the number of parameter annotation entries in this parameter annotation
- */
- public final int getNumParameterAnnotation() {
- return num_parameters;
- }
-}
+/*
+ * Copyright 2000-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.bcel.classfile;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ * base class for parameter annotations
+ *
+ * @version $Id: ParameterAnnotations
+ * @author <A HREF="mailto:[email protected]">D. Brosius</A>
+ * @since 5.2
+ */
+public abstract class ParameterAnnotations extends Attribute {
+
+ private int num_parameters;
+ private ParameterAnnotationEntry[] parameter_annotation_table; // Table of parameter annotations
+
+
+ /**
+ * @param parameter_annotation_type the subclass type of the parameter annotation
+ * @param name_index Index pointing to the name <em>Code</em>
+ * @param length Content length in bytes
+ * @param file Input stream
+ * @param constant_pool Array of constants
+ */
+ ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
+ DataInputStream file, ConstantPool constant_pool) throws IOException {
+ this(parameter_annotation_type, name_index, length, (ParameterAnnotationEntry[]) null,
+ constant_pool);
+ num_parameters = (file.readUnsignedByte());
+ parameter_annotation_table = new ParameterAnnotationEntry[num_parameters];
+ for (int i = 0; i < num_parameters; i++) {
+ parameter_annotation_table[i] = new ParameterAnnotationEntry(file, constant_pool);
+ }
+ }
+
+
+ /**
+ * @param parameter_annotation_type the subclass type of the parameter annotation
+ * @param name_index Index pointing to the name <em>Code</em>
+ * @param length Content length in bytes
+ * @param parameter_annotation_table the actual parameter annotations
+ * @param constant_pool Array of constants
+ */
+ public ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
+ ParameterAnnotationEntry[] parameter_annotation_table, ConstantPool constant_pool) {
+ super(parameter_annotation_type, name_index, length, constant_pool);
+ setParameterAnnotationTable(parameter_annotation_table);
+ }
+
+
+ /**
+ * Called by objects that are traversing the nodes of the tree implicitely
+ * defined by the contents of a Java class. I.e., the hierarchy of methods,
+ * fields, attributes, etc. spawns a tree of objects.
+ *
+ * @param v Visitor object
+ */
+ public void accept( Visitor v ) {
+ // v.visitParameterAnnotation(this);
+ }
+
+
+ /**
+ * @param parameter_annotation_table the entries to set in this parameter annotation
+ */
+ public final void setParameterAnnotationTable(
+ ParameterAnnotationEntry[] parameter_annotation_table ) {
+ this.parameter_annotation_table = parameter_annotation_table;
+ num_parameters = (parameter_annotation_table == null)
+ ? 0
+ : parameter_annotation_table.length;
+ }
+
+
+ /**
+ * @return the parameter annotation entry table
+ */
+ public final ParameterAnnotationEntry[] getParameterAnnotationTable() {
+ return parameter_annotation_table;
+ }
+
+
+ /**
+ * returns the array of parameter annotation entries in this parameter annotation
+ */
+ public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
+ return parameter_annotation_table;
+ }
+
+
+ /**
+ * @return the number of parameter annotation entries in this parameter annotation
+ */
+ public final int getNumParameterAnnotation() {
+ return num_parameters;
+ }
+}
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java Sun Jun 4 08:52:18 2006
@@ -1,52 +1,52 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents an annotation that is represented in the class file
- * but is not provided to the JVM.
- *
- * @version $Id: RuntimeInvisibleAnnotations
- * @author <A HREF="mailto:[email protected]">D. Brosius</A>
- * @since 5.2
- */
-public class RuntimeInvisibleAnnotations extends Annotations {
-
- /**
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param file Input stream
- * @param constant_pool Array of constants
- */
- RuntimeInvisibleAnnotations(int name_index, int length, DataInputStream file,
- ConstantPool constant_pool) throws IOException {
- super(Constants.ATTR_RUNTIMEINVISIBLE_ANNOTATIONS, name_index, length, file, constant_pool);
- }
-
-
- /**
- * @return deep copy of this attribute
- */
- public Attribute copy( ConstantPool constant_pool ) {
- Annotations c = (Annotations) clone();
- return c;
- }
-}
+/*
+ * Copyright 2000-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.bcel.classfile;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import org.apache.bcel.Constants;
+
+/**
+ * represents an annotation that is represented in the class file
+ * but is not provided to the JVM.
+ *
+ * @version $Id: RuntimeInvisibleAnnotations
+ * @author <A HREF="mailto:[email protected]">D. Brosius</A>
+ * @since 5.2
+ */
+public class RuntimeInvisibleAnnotations extends Annotations {
+
+ /**
+ * @param name_index Index pointing to the name <em>Code</em>
+ * @param length Content length in bytes
+ * @param file Input stream
+ * @param constant_pool Array of constants
+ */
+ RuntimeInvisibleAnnotations(int name_index, int length, DataInputStream file,
+ ConstantPool constant_pool) throws IOException {
+ super(Constants.ATTR_RUNTIMEIN_VISIBLE_ANNOTATIONS, name_index, length, file, constant_pool);
+ }
+
+
+ /**
+ * @return deep copy of this attribute
+ */
+ public Attribute copy( ConstantPool constant_pool ) {
+ Annotations c = (Annotations) clone();
+ return c;
+ }
+}
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java Sun Jun 4 08:52:18 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents a parameter annotation that is represented in the class file
- * but is not provided to the JVM.
- *
- * @version $Id: RuntimeInvisibleParameterAnnotations
- * @author <A HREF="mailto:[email protected]">D. Brosius</A>
- * @since 5.2
- */
-public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations {
-
- /**
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param file Input stream
- * @param constant_pool Array of constants
- */
- RuntimeInvisibleParameterAnnotations(int name_index, int length, DataInputStream file,
- ConstantPool constant_pool) throws IOException {
- super(Constants.ATTR_RUNTIMEINVISIBLE_PARAMETER_ANNOTATIONS, name_index, length, file,
- constant_pool);
- }
-
-
- /**
- * @return deep copy of this attribute
- */
- public Attribute copy( ConstantPool constant_pool ) {
- Annotations c = (Annotations) clone();
- return c;
- }
-}
+/*
+ * Copyright 2000-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.bcel.classfile;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import org.apache.bcel.Constants;
+
+/**
+ * represents a parameter annotation that is represented in the class file
+ * but is not provided to the JVM.
+ *
+ * @version $Id: RuntimeInvisibleParameterAnnotations
+ * @author <A HREF="mailto:[email protected]">D. Brosius</A>
+ * @since 5.2
+ */
+public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations {
+
+ /**
+ * @param name_index Index pointing to the name <em>Code</em>
+ * @param length Content length in bytes
+ * @param file Input stream
+ * @param constant_pool Array of constants
+ */
+ RuntimeInvisibleParameterAnnotations(int name_index, int length, DataInputStream file,
+ ConstantPool constant_pool) throws IOException {
+ super(Constants.ATTR_RUNTIMEIN_VISIBLE_PARAMETER_ANNOTATIONS, name_index, length, file,
+ constant_pool);
+ }
+
+
+ /**
+ * @return deep copy of this attribute
+ */
+ public Attribute copy( ConstantPool constant_pool ) {
+ Annotations c = (Annotations) clone();
+ return c;
+ }
+}
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java Sun Jun 4 08:52:18 2006
@@ -1,52 +1,52 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents an annotation that is represented in the class file
- * and is provided to the JVM.
- *
- * @version $Id: RuntimeVisibleAnnotations
- * @author <A HREF="mailto:[email protected]">D. Brosius</A>
- * @since 5.2
- */
-public class RuntimeVisibleAnnotations extends Annotations {
-
- /**
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param file Input stream
- * @param constant_pool Array of constants
- */
- RuntimeVisibleAnnotations(int name_index, int length, DataInputStream file,
- ConstantPool constant_pool) throws IOException {
- super(Constants.ATTR_RUNTIMEVISIBLE_ANNOTATIONS, name_index, length, file, constant_pool);
- }
-
-
- /**
- * @return deep copy of this attribute
- */
- public Attribute copy( ConstantPool constant_pool ) {
- Annotations c = (Annotations) clone();
- return c;
- }
-}
+/*
+ * Copyright 2000-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.bcel.classfile;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import org.apache.bcel.Constants;
+
+/**
+ * represents an annotation that is represented in the class file
+ * and is provided to the JVM.
+ *
+ * @version $Id: RuntimeVisibleAnnotations
+ * @author <A HREF="mailto:[email protected]">D. Brosius</A>
+ * @since 5.2
+ */
+public class RuntimeVisibleAnnotations extends Annotations {
+
+ /**
+ * @param name_index Index pointing to the name <em>Code</em>
+ * @param length Content length in bytes
+ * @param file Input stream
+ * @param constant_pool Array of constants
+ */
+ RuntimeVisibleAnnotations(int name_index, int length, DataInputStream file,
+ ConstantPool constant_pool) throws IOException {
+ super(Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS, name_index, length, file, constant_pool);
+ }
+
+
+ /**
+ * @return deep copy of this attribute
+ */
+ public Attribute copy( ConstantPool constant_pool ) {
+ Annotations c = (Annotations) clone();
+ return c;
+ }
+}
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java Sun Jun 4 08:52:18 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2000-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents a parameter annotation that is represented in the class file
- * and is provided to the JVM.
- *
- * @version $Id: RuntimeVisibleParameterAnnotations
- * @author <A HREF="mailto:[email protected]">D. Brosius</A>
- * @since 5.2
- */
-public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations {
-
- /**
- * @param name_index Index pointing to the name <em>Code</em>
- * @param length Content length in bytes
- * @param file Input stream
- * @param constant_pool Array of constants
- */
- RuntimeVisibleParameterAnnotations(int name_index, int length, DataInputStream file,
- ConstantPool constant_pool) throws IOException {
- super(Constants.ATTR_RUNTIMEVISIBLE_PARAMETER_ANNOTATIONS, name_index, length, file,
- constant_pool);
- }
-
-
- /**
- * @return deep copy of this attribute
- */
- public Attribute copy( ConstantPool constant_pool ) {
- Annotations c = (Annotations) clone();
- return c;
- }
-}
+/*
+ * Copyright 2000-2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.bcel.classfile;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import org.apache.bcel.Constants;
+
+/**
+ * represents a parameter annotation that is represented in the class file
+ * and is provided to the JVM.
+ *
+ * @version $Id: RuntimeVisibleParameterAnnotations
+ * @author <A HREF="mailto:[email protected]">D. Brosius</A>
+ * @since 5.2
+ */
+public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations {
+
+ /**
+ * @param name_index Index pointing to the name <em>Code</em>
+ * @param length Content length in bytes
+ * @param file Input stream
+ * @param constant_pool Array of constants
+ */
+ RuntimeVisibleParameterAnnotations(int name_index, int length, DataInputStream file,
+ ConstantPool constant_pool) throws IOException {
+ super(Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS, name_index, length, file,
+ constant_pool);
+ }
+
+
+ /**
+ * @return deep copy of this attribute
+ */
+ public Attribute copy( ConstantPool constant_pool ) {
+ Annotations c = (Annotations) clone();
+ return c;
+ }
+}
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Visitor.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Visitor.java?rev=411580&r1=411579&r2=411580&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Visitor.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Visitor.java Sun Jun 4 08:52:18 2006
@@ -17,111 +17,88 @@
package org.apache.bcel.classfile;
/**
- * Interface to make use of the Visitor pattern programming style.
- * I.e. a class that implements this interface can traverse the contents of
- * a Java class just by calling the `accept' method which all classes have.
- *
+ * Interface to make use of the Visitor pattern programming style. I.e. a class
+ * that implements this interface can traverse the contents of a Java class just
+ * by calling the `accept' method which all classes have.
+ *
* @version $Id$
- * @author <A HREF="mailto:[email protected]">M. Dahm</A>
+ * @author <A HREF="mailto:[email protected]">M. Dahm</A>
*/
-public interface Visitor {
+public interface Visitor
+{
+ public void visitCode(Code obj);
- //public void visitAnnotation(Annotations obj);
- //public void visitParameterAnnotation(ParameterAnnotations obj);
- //public void visitAnnotationEntry(AnnotationEntry obj);
- //public void visitAnnotationDefault(AnnotationDefault obj);
- public void visitCode( Code obj );
+ public void visitCodeException(CodeException obj);
+ public void visitConstantClass(ConstantClass obj);
- public void visitCodeException( CodeException obj );
+ public void visitConstantDouble(ConstantDouble obj);
+ public void visitConstantFieldref(ConstantFieldref obj);
- public void visitConstantClass( ConstantClass obj );
+ public void visitConstantFloat(ConstantFloat obj);
+ public void visitConstantInteger(ConstantInteger obj);
- public void visitConstantDouble( ConstantDouble obj );
+ public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
+ public void visitConstantLong(ConstantLong obj);
- public void visitConstantFieldref( ConstantFieldref obj );
+ public void visitConstantMethodref(ConstantMethodref obj);
+ public void visitConstantNameAndType(ConstantNameAndType obj);
- public void visitConstantFloat( ConstantFloat obj );
+ public void visitConstantPool(ConstantPool obj);
+ public void visitConstantString(ConstantString obj);
- public void visitConstantInteger( ConstantInteger obj );
+ public void visitConstantUtf8(ConstantUtf8 obj);
+ public void visitConstantValue(ConstantValue obj);
- public void visitConstantInterfaceMethodref( ConstantInterfaceMethodref obj );
+ public void visitDeprecated(Deprecated obj);
+ public void visitExceptionTable(ExceptionTable obj);
- public void visitConstantLong( ConstantLong obj );
+ public void visitField(Field obj);
+ public void visitInnerClass(InnerClass obj);
- public void visitConstantMethodref( ConstantMethodref obj );
+ public void visitInnerClasses(InnerClasses obj);
+ public void visitJavaClass(JavaClass obj);
- public void visitConstantNameAndType( ConstantNameAndType obj );
+ public void visitLineNumber(LineNumber obj);
+ public void visitLineNumberTable(LineNumberTable obj);
- public void visitConstantPool( ConstantPool obj );
+ public void visitLocalVariable(LocalVariable obj);
+ public void visitLocalVariableTable(LocalVariableTable obj);
- public void visitConstantString( ConstantString obj );
+ public void visitMethod(Method obj);
+ public void visitSignature(Signature obj);
- public void visitConstantUtf8( ConstantUtf8 obj );
+ public void visitSourceFile(SourceFile obj);
+ public void visitSynthetic(Synthetic obj);
- public void visitConstantValue( ConstantValue obj );
+ public void visitUnknown(Unknown obj);
+ public void visitStackMap(StackMap obj);
- public void visitDeprecated( Deprecated obj );
+ public void visitStackMapEntry(StackMapEntry obj);
+ public void visitAnnotation(Annotations obj);
- public void visitExceptionTable( ExceptionTable obj );
+ public void visitParameterAnnotation(ParameterAnnotations obj);
+ public void visitAnnotationEntry(AnnotationEntry obj);
- public void visitField( Field obj );
+ public void visitAnnotationDefault(AnnotationDefault obj);
+ public void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
- public void visitInnerClass( InnerClass obj );
-
-
- public void visitInnerClasses( InnerClasses obj );
-
-
- public void visitJavaClass( JavaClass obj );
-
-
- public void visitLineNumber( LineNumber obj );
-
-
- public void visitLineNumberTable( LineNumberTable obj );
-
-
- public void visitLocalVariable( LocalVariable obj );
-
-
- public void visitLocalVariableTable( LocalVariableTable obj );
-
-
- public void visitMethod( Method obj );
-
-
- public void visitSignature( Signature obj );
-
-
- public void visitSourceFile( SourceFile obj );
-
-
- public void visitSynthetic( Synthetic obj );
-
-
- public void visitUnknown( Unknown obj );
-
-
- public void visitStackMap( StackMap obj );
-
-
- public void visitStackMapEntry( StackMapEntry obj );
+ public void visitEnclosingMethod(EnclosingMethod obj);
}
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,31 @@
+package org.apache.bcel;
+
+import junit.framework.TestCase;
+import org.apache.bcel.classfile.DescendingVisitor;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.visitors.CounterVisitor;
+
+public abstract class AbstractCounterVisitorTestCase extends TestCase
+{
+ protected abstract JavaClass getTestClass() throws ClassNotFoundException;
+
+ private CounterVisitor visitor = null;
+
+ public void setUp() throws ClassNotFoundException
+ {
+ visitor = new CounterVisitor();
+ new DescendingVisitor(getTestClass(), getVisitor()).visit();
+ }
+
+ public CounterVisitor getVisitor()
+ {
+ if (visitor == null)
+ visitor = new CounterVisitor();
+ return visitor;
+ }
+
+ public void setVisitor(CounterVisitor visitor)
+ {
+ this.visitor = visitor;
+ }
+}
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,266 @@
+package org.apache.bcel;
+
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.util.ClassPath;
+import org.apache.bcel.util.SyntheticRepository;
+
+public class CounterVisitorTestCase extends AbstractCounterVisitorTestCase
+{
+ protected JavaClass getTestClass() throws ClassNotFoundException
+ {
+ JavaClass javaClass = SyntheticRepository.getInstance(
+ new ClassPath(
+ "file://F:/GSoC/Dmitriy/bcel-j5/target/test-classes/"))
+ .loadClass("org.apache.bcel.data.package-info");
+ System.out.println(javaClass.isAbstract());
+ return javaClass;
+ }
+
+ public void testAnnotationsCount()
+ {
+ System.out
+ .println("AnnotationsCount = " + getVisitor().annotationCount);
+ assertTrue(getVisitor().annotationCount == 2);
+ }
+
+ public void testAnnotationDefaultCount()
+ {
+ System.out.println("AnnotationDefaultCount = "
+ + getVisitor().annotationDefaultCount);
+ assertTrue(getVisitor().annotationDefaultCount == 0);
+ }
+
+ public void testAnnotationEntryCount()
+ {
+ System.out.println("AnnotationEntryCount = "
+ + getVisitor().annotationEntryCount);
+ assertTrue(getVisitor().annotationEntryCount == 0);
+ }
+
+ public void testCodeCount()
+ {
+ System.out.println("CodeCount = " + getVisitor().codeCount);
+ assertTrue(getVisitor().codeCount == 1);
+ }
+
+ public void testCodeExceptionCount()
+ {
+ System.out.println("CodeExceptionCount = "
+ + getVisitor().codeExceptionCount);
+ assertTrue(getVisitor().codeExceptionCount == 0);
+ }
+
+ public void testConstantClassCount()
+ {
+ System.out.println("ConstantClassCount = "
+ + getVisitor().constantClassCount);
+ assertTrue(getVisitor().constantClassCount == 2);
+ }
+
+ public void testConstantDoubleCount()
+ {
+ System.out.println("ConstantDoubleCount = "
+ + getVisitor().constantDoubleCount);
+ assertTrue(getVisitor().constantDoubleCount == 0);
+ }
+
+ public void testConstantFieldrefCount()
+ {
+ System.out.println("ConstantFieldrefCount = "
+ + getVisitor().constantFieldrefCount);
+ assertTrue(getVisitor().constantFieldrefCount == 0);
+ }
+
+ public void testConstantFloatCount()
+ {
+ System.out.println("ConstantFloatCount = "
+ + getVisitor().constantFloatCount);
+ assertTrue(getVisitor().constantFloatCount == 0);
+ }
+
+ public void testConstantIntegerCount()
+ {
+ System.out.println("ConstantIntegerCount = "
+ + getVisitor().constantIntegerCount);
+ assertTrue(getVisitor().constantIntegerCount == 0);
+ }
+
+ public void testConstantInterfaceMethodrefCount()
+ {
+ System.out.println("ConstantInterfaceMethodrefCount = "
+ + getVisitor().constantInterfaceMethodrefCount);
+ assertTrue(getVisitor().constantInterfaceMethodrefCount == 0);
+ }
+
+ public void testConstantLongCount()
+ {
+ System.out.println("ConstantLongCount = "
+ + getVisitor().constantLongCount);
+ assertTrue(getVisitor().constantLongCount == 0);
+ }
+
+ public void testConstantMethodrefCount()
+ {
+ System.out.println("ConstantMethodrefCount = "
+ + getVisitor().constantMethodrefCount);
+ assertTrue(getVisitor().constantMethodrefCount == 1);
+ }
+
+ public void testConstantNameAndTypeCount()
+ {
+ System.out.println("ConstantNameAndTypeCount = "
+ + getVisitor().constantNameAndTypeCount);
+ assertTrue(getVisitor().constantNameAndTypeCount == 1);
+ }
+
+ public void testConstantPoolCount()
+ {
+ System.out.println("ConstantPoolCount = "
+ + getVisitor().constantPoolCount);
+ assertTrue(getVisitor().constantPoolCount == 1);
+ }
+
+ public void testConstantStringCount()
+ {
+ System.out.println("ConstantStringCount = "
+ + getVisitor().constantStringCount);
+ assertTrue(getVisitor().constantStringCount == 0);
+ }
+
+ public void testConstantValueCount()
+ {
+ System.out.println("ConstantValueCount = "
+ + getVisitor().constantValueCount);
+ assertTrue(getVisitor().constantValueCount == 0);
+ }
+
+ public void testDeprecatedCount()
+ {
+ System.out.println("DeprecatedCount = " + getVisitor().deprecatedCount);
+ assertTrue(getVisitor().deprecatedCount == 0);
+ }
+
+ public void testEnclosingMethodCount()
+ {
+ System.out.println("EnclosingMethodCount = "
+ + getVisitor().enclosingMethodCount);
+ assertTrue(getVisitor().enclosingMethodCount == 0);
+ }
+
+ public void testExceptionTableCount()
+ {
+ System.out.println("ExceptionTableCount = "
+ + getVisitor().exceptionTableCount);
+ assertTrue(getVisitor().exceptionTableCount == 0);
+ }
+
+ public void testFieldCount()
+ {
+ System.out.println("FieldCount = " + getVisitor().fieldCount);
+ assertTrue(getVisitor().fieldCount == 0);
+ }
+
+ public void testInnerClassCount()
+ {
+ System.out.println("InnerClassCount = " + getVisitor().innerClassCount);
+ assertTrue(getVisitor().innerClassCount == 0);
+ }
+
+ public void testInnerClassesCount()
+ {
+ System.out.println("InnerClassesCount = "
+ + getVisitor().innerClassesCount);
+ assertTrue(getVisitor().innerClassesCount == 0);
+ }
+
+ public void testJavaClassCount()
+ {
+ System.out.println("JavaClassCount = " + getVisitor().javaClassCount);
+ assertTrue(getVisitor().javaClassCount == 1);
+ }
+
+ public void testLineNumberCount()
+ {
+ System.out.println("LineNumberCount = " + getVisitor().lineNumberCount);
+ assertTrue(getVisitor().lineNumberCount == 1);
+ }
+
+ public void testLineNumberTableCount()
+ {
+ System.out.println("LineNumberTableCount = "
+ + getVisitor().lineNumberTableCount);
+ assertTrue(getVisitor().lineNumberTableCount == 1);
+ }
+
+ public void testLocalVariableCount()
+ {
+ System.out.println("LocalVariableCount = "
+ + getVisitor().localVariableCount);
+ assertTrue(getVisitor().localVariableCount == 1);
+ }
+
+ public void testLocalVariableTableCount()
+ {
+ System.out.println("LocalVariableTableCount = "
+ + getVisitor().localVariableTableCount);
+ assertTrue(getVisitor().localVariableTableCount == 1);
+ }
+
+ public void testLocalVariableTypeTableCount()
+ {
+ System.out.println("LocalVariableTypeTableCount = "
+ + getVisitor().localVariableTypeTableCount);
+ assertTrue(getVisitor().localVariableTypeTableCount == 0);
+ }
+
+ public void testMethodCount()
+ {
+ System.out.println("MethodCount = " + getVisitor().methodCount);
+ assertTrue(getVisitor().methodCount == 1);
+ }
+
+ public void testParameterAnnotationCount()
+ {
+ System.out.println("ParameterAnnotationCount = "
+ + getVisitor().methodCount);
+ assertTrue(getVisitor().methodCount == 1);
+ }
+
+ public void testSignatureCount()
+ {
+ System.out.println("SignatureCount = "
+ + getVisitor().signatureAnnotationCount);
+ assertTrue(getVisitor().signatureAnnotationCount == 0);
+ }
+
+ public void testSourceFileCount()
+ {
+ System.out.println("SourceFileCount = " + getVisitor().sourceFileCount);
+ assertTrue(getVisitor().sourceFileCount == 1);
+ }
+
+ public void testStackMapCount()
+ {
+ System.out.println("StackMapCount = " + getVisitor().stackMapCount);
+ assertTrue(getVisitor().stackMapCount == 0);
+ }
+
+ public void testStackMapEntryCount()
+ {
+ System.out.println("StackMapEntryCount = "
+ + getVisitor().stackMapEntryCount);
+ assertTrue(getVisitor().stackMapEntryCount == 0);
+ }
+
+ public void testSyntheticCount()
+ {
+ System.out.println("SyntheticCount = " + getVisitor().syntheticCount);
+ assertTrue(getVisitor().syntheticCount == 0);
+ }
+
+ public void testUnknownCount()
+ {
+ System.out.println("UnknownCount = " + getVisitor().unknownCount);
+ assertTrue(getVisitor().unknownCount == 0);
+ }
+}
\ No newline at end of file
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/CounterVisitorTestCase.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,48 @@
+package org.apache.bcel.data;
+
+@MarkerAnnotationInvisible
+@MarkerAnnotation
+@SimpleAnnotation(id = 1)
+public abstract class MarkedType
+{
+ @MarkerAnnotationInvisible
+ @MarkerAnnotation
+ class InnerClass
+ {
+ }
+
+ @MarkerAnnotationInvisible
+ @MarkerAnnotation
+ int annotatedField;
+
+ @Deprecated
+ void deprecatedMthod()
+ {
+ }
+
+ native void nativeMthod();
+
+ abstract void abstractMethod();
+
+ @MarkerAnnotationInvisible
+ @MarkerAnnotation
+ void annotatedMethod()
+ {
+ }
+
+ void annotatedParamentrMethod(@MarkerAnnotationInvisible
+ @MarkerAnnotation
+ int i)
+ {
+ }
+
+ void constantedMethod()
+ {
+ int i1 = 1;
+ int i2 = 200000;
+ long l1 = 1;
+ long l2 = 200000;
+ float f = 0.1F;
+ String s = "";
+ }
+}
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkedType.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,10 @@
+package org.apache.bcel.data;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MarkerAnnotation
+{
+ String value() default "";
+}
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotation.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,9 @@
+package org.apache.bcel.data;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.CLASS)
+public @interface MarkerAnnotationInvisible
+{
+}
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,10 @@
+package org.apache.bcel.data;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SimpleAnnotation {
+ int id();
+ String fruit() default "bananas";
+}
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/SimpleAnnotation.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,4 @@
+@MarkerAnnotationInvisible
+@MarkerAnnotation
+@SimpleAnnotation(id = 1)
+package org.apache.bcel.data;
\ No newline at end of file
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/data/package-info.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java?rev=411580&view=auto
==============================================================================
--- jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java (added)
+++ jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java Sun Jun 4 08:52:18 2006
@@ -0,0 +1,310 @@
+package org.apache.bcel.visitors;
+
+import org.apache.bcel.classfile.AnnotationDefault;
+import org.apache.bcel.classfile.AnnotationEntry;
+import org.apache.bcel.classfile.Annotations;
+import org.apache.bcel.classfile.Code;
+import org.apache.bcel.classfile.CodeException;
+import org.apache.bcel.classfile.ConstantClass;
+import org.apache.bcel.classfile.ConstantDouble;
+import org.apache.bcel.classfile.ConstantFieldref;
+import org.apache.bcel.classfile.ConstantFloat;
+import org.apache.bcel.classfile.ConstantInteger;
+import org.apache.bcel.classfile.ConstantInterfaceMethodref;
+import org.apache.bcel.classfile.ConstantLong;
+import org.apache.bcel.classfile.ConstantMethodref;
+import org.apache.bcel.classfile.ConstantNameAndType;
+import org.apache.bcel.classfile.ConstantPool;
+import org.apache.bcel.classfile.ConstantString;
+import org.apache.bcel.classfile.ConstantUtf8;
+import org.apache.bcel.classfile.ConstantValue;
+import org.apache.bcel.classfile.Deprecated;
+import org.apache.bcel.classfile.EnclosingMethod;
+import org.apache.bcel.classfile.ExceptionTable;
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.InnerClass;
+import org.apache.bcel.classfile.InnerClasses;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.LineNumber;
+import org.apache.bcel.classfile.LineNumberTable;
+import org.apache.bcel.classfile.LocalVariable;
+import org.apache.bcel.classfile.LocalVariableTable;
+import org.apache.bcel.classfile.LocalVariableTypeTable;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.classfile.ParameterAnnotations;
+import org.apache.bcel.classfile.Signature;
+import org.apache.bcel.classfile.SourceFile;
+import org.apache.bcel.classfile.StackMap;
+import org.apache.bcel.classfile.StackMapEntry;
+import org.apache.bcel.classfile.Synthetic;
+import org.apache.bcel.classfile.Unknown;
+import org.apache.bcel.classfile.Visitor;
+
+public class CounterVisitor implements Visitor
+{
+ public int unknownCount = 0;
+
+ public int syntheticCount = 0;
+
+ public int stackMapEntryCount = 0;
+
+ public int stackMapCount = 0;
+
+ public int sourceFileCount = 0;
+
+ public int signatureAnnotationCount = 0;
+
+ public int parameterAnnotationCount = 0;
+
+ public int methodCount = 0;
+
+ public int localVariableTypeTableCount = 0;
+
+ public int localVariableTableCount = 0;
+
+ public int localVariableCount = 0;
+
+ public int lineNumberTableCount = 0;
+
+ public int lineNumberCount = 0;
+
+ public int javaClassCount = 0;
+
+ public int innerClassesCount = 0;
+
+ public int innerClassCount = 0;
+
+ public int fieldCount = 0;
+
+ public int exceptionTableCount = 0;
+
+ public int enclosingMethodCount = 0;
+
+ public int deprecatedCount = 0;
+
+ public int constantValueCount = 0;
+
+ public int constantUtf8Count = 0;
+
+ public int constantStringCount = 0;
+
+ public int constantNameAndTypeCount = 0;
+
+ public int constantPoolCount = 0;
+
+ public int constantMethodrefCount = 0;
+
+ public int constantLongCount = 0;
+
+ public int constantIntegerCount = 0;
+
+ public int constantInterfaceMethodrefCount = 0;
+
+ public int constantFloatCount = 0;
+
+ public int constantFieldrefCount = 0;
+
+ public int constantClassCount = 0;
+
+ public int constantDoubleCount = 0;
+
+ public int codeExceptionCount = 0;
+
+ public int codeCount = 0;
+
+ public int annotationEntryCount = 0;
+
+ public int annotationDefaultCount = 0;
+
+ public int annotationCount = 0;
+
+ public void visitAnnotation(Annotations obj)
+ {
+ annotationCount++;
+ }
+
+ public void visitAnnotationDefault(AnnotationDefault obj)
+ {
+ annotationDefaultCount++;
+ }
+
+ public void visitAnnotationEntry(AnnotationEntry obj)
+ {
+ annotationEntryCount++;
+ }
+
+ public void visitCode(Code obj)
+ {
+ codeCount++;
+ }
+
+ public void visitCodeException(CodeException obj)
+ {
+ codeExceptionCount++;
+ }
+
+ public void visitConstantClass(ConstantClass obj)
+ {
+ constantClassCount++;
+ }
+
+ public void visitConstantDouble(ConstantDouble obj)
+ {
+ constantDoubleCount++;
+ }
+
+ public void visitConstantFieldref(ConstantFieldref obj)
+ {
+ constantFieldrefCount++;
+ }
+
+ public void visitConstantFloat(ConstantFloat obj)
+ {
+ constantFloatCount++;
+ }
+
+ public void visitConstantInteger(ConstantInteger obj)
+ {
+ constantIntegerCount++;
+ }
+
+ public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
+ {
+ constantInterfaceMethodrefCount++;
+ }
+
+ public void visitConstantLong(ConstantLong obj)
+ {
+ constantLongCount++;
+ }
+
+ public void visitConstantMethodref(ConstantMethodref obj)
+ {
+ constantMethodrefCount++;
+ }
+
+ public void visitConstantNameAndType(ConstantNameAndType obj)
+ {
+ constantNameAndTypeCount++;
+ }
+
+ public void visitConstantPool(ConstantPool obj)
+ {
+ constantPoolCount++;
+ }
+
+ public void visitConstantString(ConstantString obj)
+ {
+ constantStringCount++;
+ }
+
+ public void visitConstantUtf8(ConstantUtf8 obj)
+ {
+ constantUtf8Count++;
+ }
+
+ public void visitConstantValue(ConstantValue obj)
+ {
+ constantValueCount++;
+ }
+
+ public void visitDeprecated(Deprecated obj)
+ {
+ deprecatedCount++;
+ }
+
+ public void visitEnclosingMethod(EnclosingMethod obj)
+ {
+ enclosingMethodCount++;
+ }
+
+ public void visitExceptionTable(ExceptionTable obj)
+ {
+ exceptionTableCount++;
+ }
+
+ public void visitField(Field obj)
+ {
+ fieldCount++;
+ }
+
+ public void visitInnerClass(InnerClass obj)
+ {
+ innerClassCount++;
+ }
+
+ public void visitInnerClasses(InnerClasses obj)
+ {
+ innerClassesCount++;
+ }
+
+ public void visitJavaClass(JavaClass obj)
+ {
+ javaClassCount++;
+ }
+
+ public void visitLineNumber(LineNumber obj)
+ {
+ lineNumberCount++;
+ }
+
+ public void visitLineNumberTable(LineNumberTable obj)
+ {
+ lineNumberTableCount++;
+ }
+
+ public void visitLocalVariable(LocalVariable obj)
+ {
+ localVariableCount++;
+ }
+
+ public void visitLocalVariableTable(LocalVariableTable obj)
+ {
+ localVariableTableCount++;
+ }
+
+ public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
+ {
+ localVariableTypeTableCount++;
+ }
+
+ public void visitMethod(Method obj)
+ {
+ methodCount++;
+ }
+
+ public void visitParameterAnnotation(ParameterAnnotations obj)
+ {
+ parameterAnnotationCount++;
+ }
+
+ public void visitSignature(Signature obj)
+ {
+ signatureAnnotationCount++;
+ }
+
+ public void visitSourceFile(SourceFile obj)
+ {
+ sourceFileCount++;
+ }
+
+ public void visitStackMap(StackMap obj)
+ {
+ stackMapCount++;
+ }
+
+ public void visitStackMapEntry(StackMapEntry obj)
+ {
+ stackMapEntryCount++;
+ }
+
+ public void visitSynthetic(Synthetic obj)
+ {
+ syntheticCount++;
+ }
+
+ public void visitUnknown(Unknown obj)
+ {
+ unknownCount++;
+ }
+}
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/bcel/trunk/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.