private byte[] createBytes(int id, Object obj) {
        switch (id) {
        case CONSTANT_CLASS:
            return createClassRefBytes((ClassRef) obj);
        case CONSTANT_FIELDREF:
            return createFieldRefBytes((FieldRef) obj);
        case CONSTANT_METHODREF:
        case CONSTANT_INTERFACEMETHODREF:
            return createMethodRefBytes((MethodRef) obj);
        case CONSTANT_STRING:
            return createStringBytes((String) obj);
        case CONSTANT_INTEGER:
            return createIntegerBytes((Integer) obj);
        case CONSTANT_FLOAT:
            return createFloatBytes((Float) obj);
        case CONSTANT_LONG:
            return createLongBytes((Long) obj);
        case CONSTANT_DOUBLE:
            return createDoubleBytes((Double) obj);
        case CONSTANT_NAMEANDTYPE:
            return createNameAndTypeBytes((NameAndType) obj);
        case CONSTANT_UTF8:
            return toUtf8((String) obj);
        default:
            throw new RuntimeException();
        }
    }
private byte [ ] createBytes ( int id , Object obj ) { switch ( id ) { case CONSTANT_CLASS : return createClassRefBytes ( ( ClassRef ) obj ) ; case CONSTANT_FIELDREF : return createFieldRefBytes ( ( FieldRef ) obj ) ; case CONSTANT_METHODREF : case CONSTANT_INTERFACEMETHODREF : return createMethodRefBytes ( ( MethodRef ) obj ) ; case CONSTANT_STRING : return createStringBytes ( ( String ) obj ) ; case CONSTANT_INTEGER : return createIntegerBytes ( ( Integer ) obj ) ; case CONSTANT_FLOAT : return createFloatBytes ( ( Float ) obj ) ; case CONSTANT_LONG : return createLongBytes ( ( Long ) obj ) ; case CONSTANT_DOUBLE : return createDoubleBytes ( ( Double ) obj ) ; case CONSTANT_NAMEANDTYPE : return createNameAndTypeBytes ( ( NameAndType ) obj ) ; case CONSTANT_UTF8 : return toUtf8 ( ( String ) obj ) ; default : throw new RuntimeException ( ) ; } }
dispatch method