Package org.apache.bcel.classfile

Examples of org.apache.bcel.classfile.Unknown


//            } else if (attributes[i] instanceof RuntimeInvisibleAnnotations) {
//                flags |= (1<<22);
            } else if (attributes[i] instanceof InnerClasses) {
                flags |= (1<<23);
            } else if (attributes[i] instanceof Unknown) {
                Unknown attr = (Unknown)attributes[i];
                int index = attrBands.getIndex(attr);
                flags |= (1<<index);

            }
        }
View Full Code Here


//                } else if (attributes[j] instanceof RuntimeInvisibleParameterAnnotations) {
//                    flags |= (1<<24);
//                } else if (attributes[j] instanceof AnnotationDefault) {
//                    flags |= (1<<25);
                } else if (attributes[j] instanceof Unknown) {
                    Unknown attr = (Unknown)attributes[i];
                    int index = attrBands.getIndex(attr);
                    flags |= (1<<index);

                }
            }
View Full Code Here

//                } else if (attributes[j] instanceof RuntimeVisibleAnnotations) {
//                    flags |= (1<<21);
//                } else if (attributes[j] instanceof RuntimeInvisibleAnnotations) {
//                    flags |= (1<<22);
                } else if (attributes[j] instanceof Unknown) {
                    Unknown attr = (Unknown)attributes[i];
                    int index = attrBands.getIndex(attr);
                    flags |= (1<<index);

                }
            }
View Full Code Here

                    } else if (attributes[j] instanceof LocalVariableTable) {
                        flags |= (1<<2);
//                    } else if (attributes[j] instanceof LocalVariableTypeTable) {
//                        flags |= (1<<3);
                    } else if (attributes[j] instanceof Unknown) {
                        Unknown attr = (Unknown)attributes[i];
                        int index = attrBands.getIndex(attr);
                        flags |= (1<<index);

                    }
                }
View Full Code Here

    public void insertClassAttribute(final Object attribute) {
        if (m_classGen == null) {
            throw new IllegalStateException("attribute enhancer is not initialized");
        }
        byte[] serializedAttribute = serialize(attribute);
        Attribute attr = new Unknown(
                m_constantPoolGen.addUtf8("Custom"),
                serializedAttribute.length,
                serializedAttribute,
                m_constantPoolGen.getConstantPool()
        );
View Full Code Here

        byte[] serializedAttribute = serialize(attribute);
        Field[] classfileField = m_classGen.getFields();
        for (int i = 0; i < classfileField.length; i++) {
            if (classfileField[i].getName().equals(field.getName())) {
                FieldGen fieldGen = new FieldGen(classfileField[i], m_constantPoolGen);
                Attribute attr = new Unknown(
                        m_constantPoolGen.addUtf8("Custom"),
                        serializedAttribute.length,
                        serializedAttribute,
                        m_constantPoolGen.getConstantPool()
                );
View Full Code Here

                            classfileMethod[i],
                            m_javaClass.getClassName(),
                            m_constantPoolGen
                    );

                    Attribute attr = new Unknown(
                            m_constantPoolGen.addUtf8("Custom"),
                            serializedAttribute.length,
                            serializedAttribute,
                            m_constantPoolGen.getConstantPool()
                    );
View Full Code Here

        Attribute[] classAttributes = m_javaClass.getAttributes();
        for (int i = 0; i < classAttributes.length; i++) {

            if (classAttributes[i] instanceof Unknown) {
                Unknown unknownAttrib = (Unknown)classAttributes[i];
                byte[] serializedAttribute = unknownAttrib.getBytes();
                try {
                    Object attribute = new ObjectInputStream(new ByteArrayInputStream(serializedAttribute)).readObject();
                    attributes.add(attribute);
                }
                catch (Exception e) {
View Full Code Here

                ) {
                    Attribute[] methodAttributes = methods[i].getAttributes();
                    for (int j = 0; j < methodAttributes.length; j++) {

                        if (methodAttributes[j] instanceof Unknown) {
                            Unknown unknownAttrib = (Unknown)methodAttributes[j];
                            byte[] serializedAttribute = unknownAttrib.getBytes();
                            try {
                                Object attribute = new ObjectInputStream(
                                        new ByteArrayInputStream(serializedAttribute)
                                ).readObject();
                                attributes.add(attribute);
View Full Code Here

        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(fieldName)) {
                Attribute[] fieldAttributes = fields[i].getAttributes();
                for (int j = 0; j < fieldAttributes.length; j++) {
                    if (fieldAttributes[j] instanceof Unknown) {
                        Unknown unknownAttrib = (Unknown)fieldAttributes[j];
                        byte[] serializedAttribute = unknownAttrib.getBytes();
                        try {
                            Object attribute = new ObjectInputStream(new ByteArrayInputStream(serializedAttribute)).readObject();
                            al.add(attribute);
                        }
                        catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.bcel.classfile.Unknown

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.