Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Apache BCEL Source Code Files
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip. Unzip the source package file and go to the "src/main" sub-directory, you will see source code files.
Here is the list of Java source code files of the Apache BCEL 6.6.1 in \Users\fyicenter\bcel-6.6.1\src:
✍: FYIcenter
⏎ org/apache/bcel/classfile/DescendingVisitor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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.util.Objects; import java.util.Stack; import java.util.stream.Stream; /** * Traverses a JavaClass with another Visitor object 'piggy-backed' that is applied to all components of a JavaClass * object. I.e. this class supplies the traversal strategy, other classes can make use of it. */ public class DescendingVisitor implements Visitor { private final JavaClass clazz; private final Visitor visitor; private final Stack<Object> stack = new Stack<>(); /** * @param clazz Class to traverse * @param visitor visitor object to apply to all components */ public DescendingVisitor(final JavaClass clazz, final Visitor visitor) { this.clazz = clazz; this.visitor = visitor; } private <E extends Node> void accept(final E[] node) { Stream.of(node).forEach(e -> e.accept(this)); } /** * @return current object */ public Object current() { return stack.peek(); } /** * @return container of current entitity, i.e., predecessor during traversal */ public Object predecessor() { return predecessor(0); } /** * @param level nesting level, i.e., 0 returns the direct predecessor * @return container of current entitity, i.e., predecessor during traversal */ public Object predecessor(final int level) { final int size = stack.size(); if (size < 2 || level < 0) { return null; } return stack.elementAt(size - (level + 2)); // size - 1 == current } /** * Start traversal. */ public void visit() { clazz.accept(this); } /** * @since 6.0 */ @Override public void visitAnnotation(final Annotations annotation) { stack.push(annotation); annotation.accept(visitor); accept(annotation.getAnnotationEntries()); stack.pop(); } /** * @since 6.0 */ @Override public void visitAnnotationDefault(final AnnotationDefault obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** * @since 6.0 */ @Override public void visitAnnotationEntry(final AnnotationEntry annotationEntry) { stack.push(annotationEntry); annotationEntry.accept(visitor); stack.pop(); } /** * @since 6.0 */ @Override public void visitBootstrapMethods(final BootstrapMethods bm) { stack.push(bm); bm.accept(visitor); // BootstrapMethod[] bms = bm.getBootstrapMethods(); // for (int i = 0; i < bms.length; i++) // { // bms[i].accept(this); // } stack.pop(); } @Override public void visitCode(final Code code) { stack.push(code); code.accept(visitor); accept(code.getExceptionTable()); accept(code.getAttributes()); stack.pop(); } @Override public void visitCodeException(final CodeException ce) { stack.push(ce); ce.accept(visitor); stack.pop(); } @Override public void visitConstantClass(final ConstantClass constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantDouble(final ConstantDouble constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } /** @since 6.3 */ @Override public void visitConstantDynamic(final ConstantDynamic obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitConstantFieldref(final ConstantFieldref constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantFloat(final ConstantFloat constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantInteger(final ConstantInteger constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantInterfaceMethodref(final ConstantInterfaceMethodref constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } /** * @since 6.0 */ @Override public void visitConstantInvokeDynamic(final ConstantInvokeDynamic constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantLong(final ConstantLong constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } /** @since 6.0 */ @Override public void visitConstantMethodHandle(final ConstantMethodHandle obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitConstantMethodref(final ConstantMethodref constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } /** @since 6.0 */ @Override public void visitConstantMethodType(final ConstantMethodType obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.1 */ @Override public void visitConstantModule(final ConstantModule obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitConstantNameAndType(final ConstantNameAndType constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } /** @since 6.1 */ @Override public void visitConstantPackage(final ConstantPackage obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitConstantPool(final ConstantPool cp) { stack.push(cp); cp.accept(visitor); Stream.of(cp.getConstantPool()).filter(Objects::nonNull).forEach(e -> e.accept(this)); stack.pop(); } @Override public void visitConstantString(final ConstantString constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantUtf8(final ConstantUtf8 constant) { stack.push(constant); constant.accept(visitor); stack.pop(); } @Override public void visitConstantValue(final ConstantValue cv) { stack.push(cv); cv.accept(visitor); stack.pop(); } @Override public void visitDeprecated(final Deprecated attribute) { stack.push(attribute); attribute.accept(visitor); stack.pop(); } /** * @since 6.0 */ @Override public void visitEnclosingMethod(final EnclosingMethod obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitExceptionTable(final ExceptionTable table) { stack.push(table); table.accept(visitor); stack.pop(); } @Override public void visitField(final Field field) { stack.push(field); field.accept(visitor); accept(field.getAttributes()); stack.pop(); } @Override public void visitInnerClass(final InnerClass inner) { stack.push(inner); inner.accept(visitor); stack.pop(); } @Override public void visitInnerClasses(final InnerClasses ic) { stack.push(ic); ic.accept(visitor); accept(ic.getInnerClasses()); stack.pop(); } @Override public void visitJavaClass(final JavaClass clazz) { stack.push(clazz); clazz.accept(visitor); accept(clazz.getFields()); accept(clazz.getMethods()); accept(clazz.getAttributes()); clazz.getConstantPool().accept(this); stack.pop(); } @Override public void visitLineNumber(final LineNumber number) { stack.push(number); number.accept(visitor); stack.pop(); } @Override public void visitLineNumberTable(final LineNumberTable table) { stack.push(table); table.accept(visitor); accept(table.getLineNumberTable()); stack.pop(); } @Override public void visitLocalVariable(final LocalVariable var) { stack.push(var); var.accept(visitor); stack.pop(); } @Override public void visitLocalVariableTable(final LocalVariableTable table) { stack.push(table); table.accept(visitor); accept(table.getLocalVariableTable()); stack.pop(); } /** * @since 6.0 */ @Override public void visitLocalVariableTypeTable(final LocalVariableTypeTable obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitMethod(final Method method) { stack.push(method); method.accept(visitor); accept(method.getAttributes()); stack.pop(); } /** * @since 6.4.0 */ @Override public void visitMethodParameter(final MethodParameter obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** * @since 6.0 */ @Override public void visitMethodParameters(final MethodParameters obj) { stack.push(obj); obj.accept(visitor); Stream.of(obj.getParameters()).forEach(e -> e.accept(this)); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModule(final Module obj) { stack.push(obj); obj.accept(visitor); accept(obj.getRequiresTable()); accept(obj.getExportsTable()); accept(obj.getOpensTable()); accept(obj.getProvidesTable()); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModuleExports(final ModuleExports obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModuleMainClass(final ModuleMainClass obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModuleOpens(final ModuleOpens obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModulePackages(final ModulePackages obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModuleProvides(final ModuleProvides obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitModuleRequires(final ModuleRequires obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitNestHost(final NestHost obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.4.0 */ @Override public void visitNestMembers(final NestMembers obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** * @since 6.0 */ @Override public void visitParameterAnnotation(final ParameterAnnotations obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } /** @since 6.0 */ @Override public void visitParameterAnnotationEntry(final ParameterAnnotationEntry obj) { stack.push(obj); obj.accept(visitor); stack.pop(); } @Override public void visitSignature(final Signature attribute) { stack.push(attribute); attribute.accept(visitor); stack.pop(); } @Override public void visitSourceFile(final SourceFile attribute) { stack.push(attribute); attribute.accept(visitor); stack.pop(); } @Override public void visitStackMap(final StackMap table) { stack.push(table); table.accept(visitor); accept(table.getStackMap()); stack.pop(); } @Override public void visitStackMapEntry(final StackMapEntry var) { stack.push(var); var.accept(visitor); stack.pop(); } @Override public void visitSynthetic(final Synthetic attribute) { stack.push(attribute); attribute.accept(visitor); stack.pop(); } @Override public void visitUnknown(final Unknown attribute) { stack.push(attribute); attribute.accept(visitor); stack.pop(); } }
⏎ org/apache/bcel/classfile/DescendingVisitor.java
Or download all of them as a single archive file:
File name: bcel-6.6.1-sources.jar File size: 688374 bytes Release date: 2022-09-18 Download
⇒ Install Apache BCEL 6.5.0 Binary Package
⇐ Download and Install Apache BCEL Source Package
2021-08-21, 71416👍, 0💬
Popular Posts:
Java Servlet 3.0 Specification API. JAR File Size and Download Location: File name: servlet-api.jar,...
commons-net-1.4.1.jar is the JAR file for Apache Commons Net 1.4.1, which implements the client side...
JAX-RPC is an API for building Web services and clients that used remote procedure calls (RPC) and X...
What Is commons-collections4-4.4 .jar?commons-collections4-4.4 .jaris the JAR file for Apache Common...
Apache Log4j provides the interface that applications should code to and provides the adapter compon...