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/generic/ElementValueGen.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 java.io.DataInput; import java.io.DataOutputStream; import java.io.IOException; import org.apache.bcel.classfile.AnnotationElementValue; import org.apache.bcel.classfile.AnnotationEntry; import org.apache.bcel.classfile.ArrayElementValue; import org.apache.bcel.classfile.ClassElementValue; import org.apache.bcel.classfile.ElementValue; import org.apache.bcel.classfile.EnumElementValue; import org.apache.bcel.classfile.SimpleElementValue; /** * @since 6.0 */ public abstract class ElementValueGen { public static final int STRING = 's'; public static final int ENUM_CONSTANT = 'e'; public static final int CLASS = 'c'; public static final int ANNOTATION = '@'; public static final int ARRAY = '['; public static final int PRIMITIVE_INT = 'I'; public static final int PRIMITIVE_BYTE = 'B'; public static final int PRIMITIVE_CHAR = 'C'; public static final int PRIMITIVE_DOUBLE = 'D'; public static final int PRIMITIVE_FLOAT = 'F'; public static final int PRIMITIVE_LONG = 'J'; public static final int PRIMITIVE_SHORT = 'S'; public static final int PRIMITIVE_BOOLEAN = 'Z'; /** * Creates an (modifiable) ElementValueGen copy of an (immutable) ElementValue - constant pool is assumed correct. */ public static ElementValueGen copy(final ElementValue value, final ConstantPoolGen cpool, final boolean copyPoolEntries) { switch (value.getElementValueType()) { case 'B': // byte case 'C': // char case 'D': // double case 'F': // float case 'I': // int case 'J': // long case 'S': // short case 'Z': // boolean case 's': // String return new SimpleElementValueGen((SimpleElementValue) value, cpool, copyPoolEntries); case 'e': // Enum constant return new EnumElementValueGen((EnumElementValue) value, cpool, copyPoolEntries); case '@': // Annotation return new AnnotationElementValueGen((AnnotationElementValue) value, cpool, copyPoolEntries); case '[': // Array return new ArrayElementValueGen((ArrayElementValue) value, cpool, copyPoolEntries); case 'c': // Class return new ClassElementValueGen((ClassElementValue) value, cpool, copyPoolEntries); default: throw new UnsupportedOperationException("Not implemented yet! (" + value.getElementValueType() + ")"); } } public static ElementValueGen readElementValue(final DataInput dis, final ConstantPoolGen cpGen) throws IOException { final int type = dis.readUnsignedByte(); switch (type) { case 'B': // byte return new SimpleElementValueGen(PRIMITIVE_BYTE, dis.readUnsignedShort(), cpGen); case 'C': // char return new SimpleElementValueGen(PRIMITIVE_CHAR, dis.readUnsignedShort(), cpGen); case 'D': // double return new SimpleElementValueGen(PRIMITIVE_DOUBLE, dis.readUnsignedShort(), cpGen); case 'F': // float return new SimpleElementValueGen(PRIMITIVE_FLOAT, dis.readUnsignedShort(), cpGen); case 'I': // int return new SimpleElementValueGen(PRIMITIVE_INT, dis.readUnsignedShort(), cpGen); case 'J': // long return new SimpleElementValueGen(PRIMITIVE_LONG, dis.readUnsignedShort(), cpGen); case 'S': // short return new SimpleElementValueGen(PRIMITIVE_SHORT, dis.readUnsignedShort(), cpGen); case 'Z': // boolean return new SimpleElementValueGen(PRIMITIVE_BOOLEAN, dis.readUnsignedShort(), cpGen); case 's': // String return new SimpleElementValueGen(STRING, dis.readUnsignedShort(), cpGen); case 'e': // Enum constant return new EnumElementValueGen(dis.readUnsignedShort(), dis.readUnsignedShort(), cpGen); case 'c': // Class return new ClassElementValueGen(dis.readUnsignedShort(), cpGen); case '@': // Annotation // TODO: isRuntimeVisible ?????????? // FIXME return new AnnotationElementValueGen(ANNOTATION, new AnnotationEntryGen(AnnotationEntry.read(dis, cpGen.getConstantPool(), true), cpGen, false), cpGen); case '[': // Array final int numArrayVals = dis.readUnsignedShort(); final ElementValue[] evalues = new ElementValue[numArrayVals]; for (int j = 0; j < numArrayVals; j++) { evalues[j] = ElementValue.readElementValue(dis, cpGen.getConstantPool()); } return new ArrayElementValueGen(ARRAY, evalues, cpGen); default: throw new IllegalArgumentException("Unexpected element value kind in annotation: " + type); } } /** * @deprecated (since 6.0) will be made private and final; do not access directly, use getter */ @Deprecated protected int type; /** * @deprecated (since 6.0) will be made private and final; do not access directly, use getter */ @Deprecated protected ConstantPoolGen cpGen; protected ElementValueGen(final int type, final ConstantPoolGen cpGen) { this.type = type; this.cpGen = cpGen; } public abstract void dump(DataOutputStream dos) throws IOException; protected ConstantPoolGen getConstantPool() { return cpGen; } /** * Subtypes return an immutable variant of the ElementValueGen */ public abstract ElementValue getElementValue(); public int getElementValueType() { return type; } public abstract String stringifyValue(); }
⏎ org/apache/bcel/generic/ElementValueGen.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, 64225👍, 0💬
Popular Posts:
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
JDK 11 java.rmi.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) module. JDK 11 RMI m...
What JAR files are required to run dom\Writer.java provided in the Apache Xerces package? 3 JAR file...
What Is log4j-1.2.13.jar? I got the JAR file from logging-log4j-1.2.13.zip .log4j-1.2.13.jar is the ...
JSP(tm) Standard Tag Library 1.1 implementation - Jakarta Taglibs hosts the Standard Taglib 1.1, an ...