本文整理了Java中org.apache.bcel.classfile.Field.accept()
方法的一些代码示例,展示了Field.accept()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.accept()
方法的具体详情如下:
包路径:org.apache.bcel.classfile.Field
类名称:Field
方法名:accept
[英]Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
[中]由遍历由Java类的内容隐式定义的树的节点的对象调用。即,方法、字段、属性等的层次结构生成一个对象树。
代码示例来源:origin: spotbugs/spotbugs
private void doVisitField(Field field) {
if (visitingField) {
throw new IllegalStateException("visitField called when already visiting a field");
}
visitingField = true;
this.field = field;
try {
fieldName = fieldSig = dottedFieldSig = fullyQualifiedFieldName = null;
thisFieldInfo = (FieldInfo) thisClassInfo.findField(getFieldName(), getFieldSig(), field.isStatic());
assert thisFieldInfo != null : "Can't get field info for " + getFullyQualifiedFieldName();
fieldIsStatic = field.isStatic();
field.accept(this);
Attribute[] attributes = field.getAttributes();
for (Attribute attribute : attributes) {
attribute.accept(this);
}
} finally {
visitingField = false;
this.field = null;
this.thisFieldInfo = null;
}
}
代码示例来源:origin: org.apache.bcel/bcel
@Override
public void visitField(final Field field)
{
stack.push(field);
field.accept(visitor);
final Attribute[] attributes = field.getAttributes();
for (final Attribute attribute : attributes) {
attribute.accept(this);
}
stack.pop();
}
代码示例来源:origin: bcel/bcel
public void visitField(Field field) {
stack.push(field);
field.accept(visitor);
Attribute[] attributes = field.getAttributes();
for(int i=0; i < attributes.length; i++)
attributes[i].accept(this);
stack.pop();
}
代码示例来源:origin: org.apache.bcel/bcel
_out.println(" FieldGen field;");
for (final Field field : fields) {
field.accept(this);
代码示例来源:origin: bcel/bcel
fields[i].accept(this);
代码示例来源:origin: bcel/bcel
public void visitJavaClass(JavaClass clazz) {
stack.push(clazz);
clazz.accept(visitor);
Field[] fields = clazz.getFields();
for(int i=0; i < fields.length; i++)
fields[i].accept(this);
Method[] methods = clazz.getMethods();
for(int i=0; i < methods.length; i++)
methods[i].accept(this);
Attribute[] attributes = clazz.getAttributes();
for(int i=0; i < attributes.length; i++)
attributes[i].accept(this);
clazz.getConstantPool().accept(this);
stack.pop();
}
代码示例来源:origin: org.apache.bcel/bcel
@Override
public void visitJavaClass(final JavaClass _clazz)
{
stack.push(_clazz);
_clazz.accept(visitor);
final Field[] fields = _clazz.getFields();
for (final Field field : fields) {
field.accept(this);
}
final Method[] methods = _clazz.getMethods();
for (final Method method : methods) {
method.accept(this);
}
final Attribute[] attributes = _clazz.getAttributes();
for (final Attribute attribute : attributes) {
attribute.accept(this);
}
_clazz.getConstantPool().accept(this);
stack.pop();
}
代码示例来源:origin: com.google.code.findbugs/findbugs
private void doVisitField(Field field) {
if (visitingField) {
throw new IllegalStateException("visitField called when already visiting a field");
}
visitingField = true;
this.field = field;
try {
fieldName = fieldSig = dottedFieldSig = fullyQualifiedFieldName = null;
thisFieldInfo = (FieldInfo) thisClassInfo.findField(getFieldName(), getFieldSig(), field.isStatic());
assert thisFieldInfo != null : "Can't get field info for " + getFullyQualifiedFieldName();
fieldIsStatic = field.isStatic();
field.accept(this);
Attribute[] attributes = field.getAttributes();
for (Attribute attribute : attributes) {
attribute.accept(this);
}
} finally {
visitingField = false;
this.field = null;
this.thisFieldInfo = null;
}
}
内容来源于网络,如有侵权,请联系作者删除!