当前位置: 首页>>代码示例>>Java>>正文


Java Constants.T_OBJECT属性代码示例

本文整理汇总了Java中com.sun.org.apache.bcel.internal.Constants.T_OBJECT属性的典型用法代码示例。如果您正苦于以下问题:Java Constants.T_OBJECT属性的具体用法?Java Constants.T_OBJECT怎么用?Java Constants.T_OBJECT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.org.apache.bcel.internal.Constants的用法示例。


在下文中一共展示了Constants.T_OBJECT属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAppend

public Instruction createAppend(Type type) {
  byte t = type.getType();

  if(isString(type))
    return createInvoke(append_mos[0], Constants.INVOKEVIRTUAL);

  switch(t) {
  case Constants.T_BOOLEAN:
  case Constants.T_CHAR:
  case Constants.T_FLOAT:
  case Constants.T_DOUBLE:
  case Constants.T_BYTE:
  case Constants.T_SHORT:
  case Constants.T_INT:
  case Constants.T_LONG
    :   return createInvoke(append_mos[t], Constants.INVOKEVIRTUAL);
  case Constants.T_ARRAY:
  case Constants.T_OBJECT:
    return createInvoke(append_mos[1], Constants.INVOKEVIRTUAL);
  default:
    throw new RuntimeException("Oops: No append for this type? " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:InstructionFactory.java

示例2: createReturn

/** Create typed return
 */
public static ReturnInstruction createReturn(Type type) {
  switch(type.getType()) {
  case Constants.T_ARRAY:
  case Constants.T_OBJECT:  return ARETURN;
  case Constants.T_INT:
  case Constants.T_SHORT:
  case Constants.T_BOOLEAN:
  case Constants.T_CHAR:
  case Constants.T_BYTE:    return IRETURN;
  case Constants.T_FLOAT:   return FRETURN;
  case Constants.T_DOUBLE:  return DRETURN;
  case Constants.T_LONG:    return LRETURN;
  case Constants.T_VOID:    return RETURN;

  default:
    throw new RuntimeException("Invalid type: " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:InstructionFactory.java

示例3: createStore

/**
 * @param index index of local variable
 */
public static LocalVariableInstruction createStore(Type type, int index) {
  switch(type.getType()) {
  case Constants.T_BOOLEAN:
  case Constants.T_CHAR:
  case Constants.T_BYTE:
  case Constants.T_SHORT:
  case Constants.T_INT:    return new ISTORE(index);
  case Constants.T_FLOAT:  return new FSTORE(index);
  case Constants.T_DOUBLE: return new DSTORE(index);
  case Constants.T_LONG:   return new LSTORE(index);
  case Constants.T_ARRAY:
  case Constants.T_OBJECT: return new ASTORE(index);
  default:       throw new RuntimeException("Invalid type " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:InstructionFactory.java

示例4: createLoad

/**
 * @param index index of local variable
 */
public static LocalVariableInstruction createLoad(Type type, int index) {
  switch(type.getType()) {
  case Constants.T_BOOLEAN:
  case Constants.T_CHAR:
  case Constants.T_BYTE:
  case Constants.T_SHORT:
  case Constants.T_INT:    return new ILOAD(index);
  case Constants.T_FLOAT:  return new FLOAD(index);
  case Constants.T_DOUBLE: return new DLOAD(index);
  case Constants.T_LONG:   return new LLOAD(index);
  case Constants.T_ARRAY:
  case Constants.T_OBJECT: return new ALOAD(index);
  default:       throw new RuntimeException("Invalid type " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:InstructionFactory.java

示例5: createArrayLoad

/**
 * @param type type of elements of array, i.e., array.getElementType()
 */
public static ArrayInstruction createArrayLoad(Type type) {
  switch(type.getType()) {
  case Constants.T_BOOLEAN:
  case Constants.T_BYTE:   return BALOAD;
  case Constants.T_CHAR:   return CALOAD;
  case Constants.T_SHORT:  return SALOAD;
  case Constants.T_INT:    return IALOAD;
  case Constants.T_FLOAT:  return FALOAD;
  case Constants.T_DOUBLE: return DALOAD;
  case Constants.T_LONG:   return LALOAD;
  case Constants.T_ARRAY:
  case Constants.T_OBJECT: return AALOAD;
  default:       throw new RuntimeException("Invalid type " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:InstructionFactory.java

示例6: createArrayStore

/**
 * @param type type of elements of array, i.e., array.getElementType()
 */
public static ArrayInstruction createArrayStore(Type type) {
  switch(type.getType()) {
  case Constants.T_BOOLEAN:
  case Constants.T_BYTE:   return BASTORE;
  case Constants.T_CHAR:   return CASTORE;
  case Constants.T_SHORT:  return SASTORE;
  case Constants.T_INT:    return IASTORE;
  case Constants.T_FLOAT:  return FASTORE;
  case Constants.T_DOUBLE: return DASTORE;
  case Constants.T_LONG:   return LASTORE;
  case Constants.T_ARRAY:
  case Constants.T_OBJECT: return AASTORE;
  default:       throw new RuntimeException("Invalid type " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:InstructionFactory.java

示例7: createNull

/** Create "null" value for reference types, 0 for basic types like int
 */
public static Instruction createNull(Type type) {
  switch(type.getType()) {
  case Constants.T_ARRAY:
  case Constants.T_OBJECT:  return ACONST_NULL;
  case Constants.T_INT:
  case Constants.T_SHORT:
  case Constants.T_BOOLEAN:
  case Constants.T_CHAR:
  case Constants.T_BYTE:    return ICONST_0;
  case Constants.T_FLOAT:   return FCONST_0;
  case Constants.T_DOUBLE:  return DCONST_0;
  case Constants.T_LONG:    return LCONST_0;
  case Constants.T_VOID:    return NOP;

  default:
    throw new RuntimeException("Invalid type: " + type);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:InstructionFactory.java

示例8: ReferenceType

/** Class is non-abstract but not instantiable from the outside
 */
ReferenceType() {
  super(Constants.T_OBJECT, "<null object>");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:ReferenceType.java


注:本文中的com.sun.org.apache.bcel.internal.Constants.T_OBJECT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。