Java Code Examples for com.sun.org.apache.bcel.internal.Constants#GETFIELD

The following examples show how to use com.sun.org.apache.bcel.internal.Constants#GETFIELD . 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: InstructionFactory.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 2
Source File: InstructionFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 3
Source File: InstructionFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 4
Source File: InstructionFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 5
Source File: InstructionFactory.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 6
Source File: InstructionFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 7
Source File: InstructionFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 8
Source File: InstructionFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 9
Source File: InstructionFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 10
Source File: InstructionFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** Create a field instruction.
 *
 * @param class_name name of the accessed class
 * @param name name of the referenced field
 * @param type  type of field
 * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
 * @see Constants
 */
public FieldInstruction createFieldAccess(String class_name, String name, Type type, short kind) {
  int    index;
  String signature  = type.getSignature();

  index = cp.addFieldref(class_name, name, signature);

  switch(kind) {
  case Constants.GETFIELD:  return new GETFIELD(index);
  case Constants.PUTFIELD:  return new PUTFIELD(index);
  case Constants.GETSTATIC: return new GETSTATIC(index);
  case Constants.PUTSTATIC: return new PUTSTATIC(index);

  default:
    throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
  }
}
 
Example 11
Source File: GETFIELD.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 12
Source File: GETFIELD.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 13
Source File: GETFIELD.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 14
Source File: GETFIELD.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 15
Source File: GETFIELD.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 16
Source File: GETFIELD.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 17
Source File: GETFIELD.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 18
Source File: GETFIELD.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 19
Source File: GETFIELD.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}
 
Example 20
Source File: GETFIELD.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public GETFIELD(int index) {
  super(Constants.GETFIELD, index);
}