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 6.5.0 Source Code Files
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-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.5.0 in \Users\fyicenter\bcel-6.5.0\src:
✍: FYIcenter.com
⏎ org/apache/bcel/generic/CodeExceptionGen.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.generic; import org.apache.bcel.classfile.CodeException; /** * This class represents an exception handler, i.e., specifies the region where * a handler is active and an instruction where the actual handling is done. * pool as parameters. Opposed to the JVM specification the end of the handled * region is set to be inclusive, i.e. all instructions between start and end * are protected including the start and end instructions (handles) themselves. * The end of the region is automatically mapped to be exclusive when calling * getCodeException(), i.e., there is no difference semantically. * * @see MethodGen * @see CodeException * @see InstructionHandle */ public final class CodeExceptionGen implements InstructionTargeter, Cloneable { private InstructionHandle startPc; private InstructionHandle endPc; private InstructionHandle handlerPc; private ObjectType catchType; /** * Add an exception handler, i.e., specify region where a handler is active and an * instruction where the actual handling is done. * * @param startPc Start of handled region (inclusive) * @param endPc End of handled region (inclusive) * @param handlerPc Where handling is done * @param catchType which exception is handled, null for ANY */ public CodeExceptionGen(final InstructionHandle startPc, final InstructionHandle endPc, final InstructionHandle handlerPc, final ObjectType catchType) { setStartPC(startPc); setEndPC(endPc); setHandlerPC(handlerPc); this.catchType = catchType; } /** * Get CodeException object.<BR> * * This relies on that the instruction list has already been dumped * to byte code or or that the `setPositions' methods has been * called for the instruction list. * * @param cp constant pool */ public CodeException getCodeException( final ConstantPoolGen cp ) { return new CodeException(startPc.getPosition(), endPc.getPosition() + endPc.getInstruction().getLength(), handlerPc.getPosition(), (catchType == null) ? 0 : cp.addClass(catchType)); } /* Set start of handler * @param startPc Start of handled region (inclusive) */ public void setStartPC( final InstructionHandle start_pc ) { // TODO could be package-protected? BranchInstruction.notifyTarget(this.startPc, start_pc, this); this.startPc = start_pc; } /* Set end of handler * @param endPc End of handled region (inclusive) */ public void setEndPC( final InstructionHandle end_pc ) { // TODO could be package-protected? BranchInstruction.notifyTarget(this.endPc, end_pc, this); this.endPc = end_pc; } /* Set handler code * @param handlerPc Start of handler */ public void setHandlerPC( final InstructionHandle handler_pc ) { // TODO could be package-protected? BranchInstruction.notifyTarget(this.handlerPc, handler_pc, this); this.handlerPc = handler_pc; } /** * @param old_ih old target, either start or end * @param new_ih new target */ @Override public void updateTarget( final InstructionHandle old_ih, final InstructionHandle new_ih ) { boolean targeted = false; if (startPc == old_ih) { targeted = true; setStartPC(new_ih); } if (endPc == old_ih) { targeted = true; setEndPC(new_ih); } if (handlerPc == old_ih) { targeted = true; setHandlerPC(new_ih); } if (!targeted) { throw new ClassGenException("Not targeting " + old_ih + ", but {" + startPc + ", " + endPc + ", " + handlerPc + "}"); } } /** * @return true, if ih is target of this handler */ @Override public boolean containsTarget( final InstructionHandle ih ) { return (startPc == ih) || (endPc == ih) || (handlerPc == ih); } /** Sets the type of the Exception to catch. Set 'null' for ANY. */ public void setCatchType( final ObjectType catchType ) { this.catchType = catchType; } /** Gets the type of the Exception to catch, 'null' for ANY. */ public ObjectType getCatchType() { return catchType; } /** @return start of handled region (inclusive) */ public InstructionHandle getStartPC() { return startPc; } /** @return end of handled region (inclusive) */ public InstructionHandle getEndPC() { return endPc; } /** @return start of handler */ public InstructionHandle getHandlerPC() { return handlerPc; } @Override public String toString() { return "CodeExceptionGen(" + startPc + ", " + endPc + ", " + handlerPc + ")"; } @Override public Object clone() { try { return super.clone(); } catch (final CloneNotSupportedException e) { throw new Error("Clone Not Supported"); // never happens } } }
⏎ org/apache/bcel/generic/CodeExceptionGen.java
Or download all of them as a single archive file:
File name: bcel-6.5.0-fyi.zip File size: 706792 bytes Release date: 2020-07-03 Download
⇐ Install Apache BCEL 6.5.0 Binary Package
2023-04-03, 28002👍, 5💬
Popular Posts:
commons-net.jar is the bytecode of Apache Commons Net library, which implements the client side of m...
How to download and install Apache XMLBeans-2.6.0.zip? If you want to try the XMLBeans Java library,...
What Is poi-scratchpad-3.5.jar? poi-scratchpad-3.5.jar is one of the JAR files for Apache POI 3.5, w...
Provides support for the runtime platform, core utility methods and the extension registry. JAR File...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...