org.apache.bcel.classfile.Attribute.getTag()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中org.apache.bcel.classfile.Attribute.getTag()方法的一些代码示例,展示了Attribute.getTag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.getTag()方法的具体详情如下:
包路径:org.apache.bcel.classfile.Attribute
类名称:Attribute
方法名:getTag

Attribute.getTag介绍

暂无

代码示例

代码示例来源:origin: oracle/opengrok

if (a.getTag() == org.apache.bcel.Const.ATTR_CODE) {
  for (Attribute ca : ((Code) a).getAttributes()) {
    if (ca.getTag() == org.apache.bcel.Const.ATTR_LOCAL_VARIABLE_TABLE) {
      for (LocalVariable l : ((LocalVariableTable) ca).getLocalVariableTable()) {
        printLocal(out, fout, l, v, defs, refs);
} else if   (a.getTag() == org.apache.bcel.Const.ATTR_BOOTSTRAP_METHODS ) {
} else if (a.getTag() == org.apache.bcel.Const.ATTR_SOURCE_FILE) {
  v[a.getNameIndex()] = 1;
  break;
ArrayList<LocalVariable[]> locals = new ArrayList<>();
for (Attribute a : m.getAttributes()) {
  if (a.getTag() == org.apache.bcel.Const.ATTR_EXCEPTIONS) {
    for (int i : ((ExceptionTable) a).getExceptionIndexTable()) {
      v[i] = 1;
  } else if (a.getTag() == org.apache.bcel.Const.ATTR_CODE) {
    for (Attribute ca : ((Code) a).getAttributes()) {
      if (ca.getTag() == org.apache.bcel.Const.ATTR_LOCAL_VARIABLE_TABLE) {
        locals.add(((LocalVariableTable) ca).getLocalVariableTable());

代码示例来源:origin: bcel/bcel

/**
 * @return constant value associated with this field (may be null)
 */
public final ConstantValue getConstantValue() {
 for(int i=0; i < attributes_count; i++)
  if(attributes[i].getTag() == Constants.ATTR_CONSTANT_VALUE)
 return (ConstantValue)attributes[i];
 return null;
}

代码示例来源:origin: org.apache.bcel/bcel

/**
 * @return constant value associated with this field (may be null)
 */
public final ConstantValue getConstantValue() {
  for (final Attribute attribute : super.getAttributes()) {
    if (attribute.getTag() == Const.ATTR_CONSTANT_VALUE) {
      return (ConstantValue) attribute;
    }
  }
  return null;
}

代码示例来源:origin: bcel/bcel

file.print("<H4>Attributes</H4><UL>\n");
 for(int i=0; i < attributes.length; i++) {
byte tag = attributes[i].getTag();
  tag = attributes2[j].getTag();
  file.print("<LI><A HREF=\"" + class_name + "_attributes.html#" +
      "method" + method_number + "@" + i + "@" + j + "\" TARGET=Attributes>" +

代码示例来源:origin: bcel/bcel

if(attributes[i].getTag() == ATTR_CONSTANT_VALUE) { // Default value
String str = ((ConstantValue)attributes[i]).toString();

代码示例来源:origin: bcel/bcel

method_number); 
 byte tag = attributes[i].getTag();
 if(tag == ATTR_EXCEPTIONS) {
file.print("<TR VALIGN=TOP><TD COLSPAN=2></TD><TH ALIGN=LEFT>throws</TH><TD>");

代码示例来源:origin: org.apache.bcel/bcel

if (attributes[i].getTag() == Const.ATTR_CONSTANT_VALUE) { // Default value
  final String str = ((ConstantValue) attributes[i]).toString();

代码示例来源:origin: org.apache.bcel/bcel

attribute_html.writeAttribute(attributes[i], "method" + method_number + "@" + i,
    method_number);
final byte tag = attributes[i].getTag();
if (tag == Const.ATTR_EXCEPTIONS) {
  file.print("<TR VALIGN=TOP><TD COLSPAN=2></TD><TH ALIGN=LEFT>throws</TH><TD>");

代码示例来源:origin: org.apache.bcel/bcel

file.print("<H4>Attributes</H4><UL>\n");
for (int i = 0; i < attributes.length; i++) {
  byte tag = attributes[i].getTag();
  if (tag != Const.ATTR_UNKNOWN) {
    file.print("<LI><A HREF=\"" + class_name + "_attributes.html#method"
    file.print("<UL>");
    for (int j = 0; j < attributes2.length; j++) {
      tag = attributes2[j].getTag();
      file.print("<LI><A HREF=\"" + class_name + "_attributes.html#" + "method"
          + method_number + "@" + i + "@" + j + "\" TARGET=Attributes>"

代码示例来源:origin: bcel/bcel

final void writeAttribute(Attribute attribute, String anchor, int method_number) throws IOException {	
 byte         tag = attribute.getTag();
 int        index;

代码示例来源:origin: org.apache.bcel/bcel

final void writeAttribute( final Attribute attribute, final String anchor, final int method_number ) {
  final byte tag = attribute.getTag();
  int index;
  if (tag == Const.ATTR_UNKNOWN) {

代码示例来源:origin: bcel/bcel

if(attributes[i].getTag() == ATTR_LOCAL_VARIABLE_TABLE) {
 LocalVariable[] vars = ((LocalVariableTable)attributes[i]).getLocalVariableTable();

代码示例来源:origin: org.apache.bcel/bcel

if (attribute.getTag() == Const.ATTR_LOCAL_VARIABLE_TABLE) {
  final LocalVariable[] vars = ((LocalVariableTable) attribute)
      .getLocalVariableTable();

相关文章