Package javassist.bytecode

Examples of javassist.bytecode.InnerClassesAttribute.tableLength()


                                                InnerClassesAttribute.tag);
        if (ica == null)
            return null;

        String name = getName();
        int n = ica.tableLength();
        for (int i = 0; i < n; ++i)
            if (name.equals(ica.innerClass(i))) {
                String outName = ica.outerClass(i);
                if (outName != null)
                    return classPool.get(outName);
View Full Code Here


            ClassFile classFile = clazz.getClassFile2();
            AttributeInfo attribute = classFile.getAttribute(InnerClassesAttribute.tag);
            if (attribute != null && attribute instanceof InnerClassesAttribute) {
                InnerClassesAttribute ica = (InnerClassesAttribute) attribute;
                String name = classFile.getName();
                int n = ica.tableLength();
                for (int i = 0; i < n; ++i) {
                    if (name.equals(ica.innerClass(i))) {
                        int accessFlags = ica.accessFlags(i);
                        if (Modifier.isFinal(accessFlags)) {
                            ica.setAccessFlags(i, accessFlags ^ Modifier.FINAL);
View Full Code Here

/*      */
/*  401 */     if (ica == null) {
/*  402 */       return new CtClass[0];
/*      */     }
/*  404 */     String thisName = cf.getName();
/*  405 */     int n = ica.tableLength();
/*  406 */     ArrayList list = new ArrayList(n);
/*  407 */     for (int i = 0; i < n; i++) {
/*  408 */       String outer = ica.outerClass(i);
/*      */
/*  413 */       if ((outer == null) || (outer.equals(thisName))) {
View Full Code Here

/*      */
/*  741 */     if (ica == null) {
/*  742 */       return null;
/*      */     }
/*  744 */     String name = getName();
/*  745 */     int n = ica.tableLength();
/*  746 */     for (int i = 0; i < n; i++) {
/*  747 */       if (name.equals(ica.innerClass(i))) {
/*  748 */         String outName = ica.outerClass(i);
/*  749 */         if (outName != null) {
/*  750 */           return this.classPool.get(outName);
View Full Code Here

/* 42 */     InnerClassesAttribute ica = (InnerClassesAttribute)cf.getAttribute("InnerClasses");
/*    */
/* 44 */     if (ica == null) {
/* 45 */       return;
/*    */     }
/* 47 */     int n = ica.tableLength();
/* 48 */     for (int i = 0; i < n; i++)
/* 49 */       if (name.equals(ica.innerClass(i))) {
/* 50 */         int acc = ica.accessFlags(i) & 0x8;
/* 51 */         ica.setAccessFlags(i, mod | acc);
/* 52 */         String outName = ica.outerClass(i);
View Full Code Here

    // replace simple names in the InnerClasses attribute too
    ConstPool constants = c.getClassFile().getConstPool();
    InnerClassesAttribute attr = (InnerClassesAttribute)c.getClassFile().getAttribute( InnerClassesAttribute.tag );
    if( attr != null )
    {
      for( int i=0; i<attr.tableLength(); i++ )
      {
        ClassEntry classEntry = new ClassEntry( Descriptor.toJvmName( attr.innerClass( i ) ) );
        if( attr.innerNameIndex( i ) != 0 )
        {
          attr.setInnerNameIndex( i, constants.addUtf8Info( classEntry.getInnerClassName() ) );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.