Java Code Examples for org.objectweb.asm.Opcodes#ACC_TRANSITIVE

The following examples show how to use org.objectweb.asm.Opcodes#ACC_TRANSITIVE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Textifier.java    From Concurnas with MIT License 6 votes vote down vote up
@Override
public void visitRequire(final String require, final int access, final String version) {
  stringBuilder.setLength(0);
  stringBuilder.append(tab).append("requires ");
  if ((access & Opcodes.ACC_TRANSITIVE) != 0) {
    stringBuilder.append("transitive ");
  }
  if ((access & Opcodes.ACC_STATIC_PHASE) != 0) {
    stringBuilder.append("static ");
  }
  stringBuilder.append(require).append(';');
  appendRawAccess(access);
  if (version != null) {
    stringBuilder.append("  // version ").append(version).append('\n');
  }
  text.add(stringBuilder.toString());
}
 
Example 2
Source File: CheckModuleAdapter.java    From Concurnas with MIT License 6 votes vote down vote up
@Override
public void visitRequire(final String module, final int access, final String version) {
  checkVisitEndNotCalled();
  CheckClassAdapter.checkFullyQualifiedName(Opcodes.V9, module, "required module");
  requiredModules.checkNameNotAlreadyDeclared(module);
  CheckClassAdapter.checkAccess(
      access,
      Opcodes.ACC_STATIC_PHASE
          | Opcodes.ACC_TRANSITIVE
          | Opcodes.ACC_SYNTHETIC
          | Opcodes.ACC_MANDATED);
  if (classVersion >= Opcodes.V10
      && module.equals("java.base")
      && (access & (Opcodes.ACC_STATIC_PHASE | Opcodes.ACC_TRANSITIVE)) != 0) {
    throw new IllegalArgumentException(
        "Invalid access flags: "
            + access
            + " java.base can not be declared ACC_TRANSITIVE or ACC_STATIC_PHASE");
  }
  super.visitRequire(module, access, version);
}
 
Example 3
Source File: Textifier.java    From JByteMod-Beta with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitRequire(String require, int access, String version) {
  buf.setLength(0);
  buf.append(tab).append("requires ");
  if ((access & Opcodes.ACC_TRANSITIVE) != 0) {
    buf.append("transitive ");
  }
  if ((access & Opcodes.ACC_STATIC_PHASE) != 0) {
    buf.append("static ");
  }
  buf.append(require).append(";  // access flags 0x").append(Integer.toHexString(access).toUpperCase()).append('\n');
  if (version != null) {
    buf.append("  // version ").append(version).append('\n');
  }
  text.add(buf.toString());
}
 
Example 4
Source File: Textifier.java    From JReFrameworker with MIT License 6 votes vote down vote up
@Override
public void visitRequire(final String require, final int access, final String version) {
  stringBuilder.setLength(0);
  stringBuilder.append(tab).append("requires ");
  if ((access & Opcodes.ACC_TRANSITIVE) != 0) {
    stringBuilder.append("transitive ");
  }
  if ((access & Opcodes.ACC_STATIC_PHASE) != 0) {
    stringBuilder.append("static ");
  }
  stringBuilder.append(require).append(';');
  appendRawAccess(access);
  if (version != null) {
    stringBuilder.append("  // version ").append(version).append('\n');
  }
  text.add(stringBuilder.toString());
}
 
Example 5
Source File: CheckModuleAdapter.java    From JReFrameworker with MIT License 6 votes vote down vote up
@Override
public void visitRequire(final String module, final int access, final String version) {
  checkVisitEndNotCalled();
  CheckClassAdapter.checkFullyQualifiedName(Opcodes.V9, module, "required module");
  requiredModules.checkNameNotAlreadyDeclared(module);
  CheckClassAdapter.checkAccess(
      access,
      Opcodes.ACC_STATIC_PHASE
          | Opcodes.ACC_TRANSITIVE
          | Opcodes.ACC_SYNTHETIC
          | Opcodes.ACC_MANDATED);
  if (classVersion >= Opcodes.V10
      && module.equals("java.base")
      && (access & (Opcodes.ACC_STATIC_PHASE | Opcodes.ACC_TRANSITIVE)) != 0) {
    throw new IllegalArgumentException(
        "Invalid access flags: "
            + access
            + " java.base can not be declared ACC_TRANSITIVE or ACC_STATIC_PHASE");
  }
  super.visitRequire(module, access, version);
}
 
Example 6
Source File: Textifier.java    From JReFrameworker with MIT License 6 votes vote down vote up
@Override
public void visitRequire(final String require, final int access, final String version) {
  stringBuilder.setLength(0);
  stringBuilder.append(tab).append("requires ");
  if ((access & Opcodes.ACC_TRANSITIVE) != 0) {
    stringBuilder.append("transitive ");
  }
  if ((access & Opcodes.ACC_STATIC_PHASE) != 0) {
    stringBuilder.append("static ");
  }
  stringBuilder.append(require).append(';');
  appendRawAccess(access);
  if (version != null) {
    stringBuilder.append("  // version ").append(version).append('\n');
  }
  text.add(stringBuilder.toString());
}
 
Example 7
Source File: CheckModuleAdapter.java    From JReFrameworker with MIT License 6 votes vote down vote up
@Override
public void visitRequire(final String module, final int access, final String version) {
  checkVisitEndNotCalled();
  CheckClassAdapter.checkFullyQualifiedName(Opcodes.V9, module, "required module");
  requiredModules.checkNameNotAlreadyDeclared(module);
  CheckClassAdapter.checkAccess(
      access,
      Opcodes.ACC_STATIC_PHASE
          | Opcodes.ACC_TRANSITIVE
          | Opcodes.ACC_SYNTHETIC
          | Opcodes.ACC_MANDATED);
  if (classVersion >= Opcodes.V10
      && module.equals("java.base")
      && (access & (Opcodes.ACC_STATIC_PHASE | Opcodes.ACC_TRANSITIVE)) != 0) {
    throw new IllegalArgumentException(
        "Invalid access flags: "
            + access
            + " java.base can not be declared ACC_TRANSITIVE or ACC_STATIC_PHASE");
  }
  super.visitRequire(module, access, version);
}