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

The following examples show how to use com.sun.org.apache.bcel.internal.Constants#MAX_BYTE . 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: ArrayType.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 2
Source File: ArrayType.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 3
Source File: ArrayType.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 4
Source File: ArrayType.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 5
Source File: ArrayType.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 6
Source File: ArrayType.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 7
Source File: ArrayType.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 8
Source File: ArrayType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 9
Source File: ArrayType.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 10
Source File: ArrayType.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for array of given type
 *
 * @param type type of array (may be an array itself)
 */
public ArrayType(Type type, int dimensions) {
  super(Constants.T_ARRAY, "<dummy>");

  if((dimensions < 1) || (dimensions > Constants.MAX_BYTE))
    throw new ClassGenException("Invalid number of dimensions: " + dimensions);

  switch(type.getType()) {
  case Constants.T_ARRAY:
    ArrayType array = (ArrayType)type;
    this.dimensions = dimensions + array.dimensions;
    basic_type      = array.basic_type;
    break;

  case Constants.T_VOID:
    throw new ClassGenException("Invalid type: void[]");

  default: // Basic type or reference
    this.dimensions = dimensions;
    basic_type = type;
    break;
  }

  StringBuffer buf = new StringBuffer();
  for(int i=0; i < this.dimensions; i++)
    buf.append('[');

  buf.append(basic_type.getSignature());

  signature = buf.toString();
}
 
Example 11
Source File: LocalVariableInstruction.java    From openjdk-8 with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 12
Source File: LocalVariableInstruction.java    From openjdk-8-source with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 13
Source File: LocalVariableInstruction.java    From hottub with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 14
Source File: LocalVariableInstruction.java    From openjdk-jdk9 with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 15
Source File: LocalVariableInstruction.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 16
Source File: LocalVariableInstruction.java    From openjdk-jdk8u with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 17
Source File: LocalVariableInstruction.java    From JDKSourceCode1.8 with MIT License votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 18
Source File: LocalVariableInstruction.java    From jdk8u60 with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 19
Source File: LocalVariableInstruction.java    From TencentKona-8 with GNU General Public License v2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; } 
Example 20
Source File: LocalVariableInstruction.java    From jdk1.8-source-analysis with Apache License 2.0 votes vote down vote up
private final boolean wide() { return n > Constants.MAX_BYTE; }