private boolean isVisible(FieldOrMethod obj) { return (obj.getAccessFlags() & Const.ACC_PUBLIC) != 0 || (obj.getAccessFlags() & Const.ACC_PROTECTED) != 0; }
private boolean isVisible(FieldOrMethod obj) { return (obj.getAccessFlags() & ACC_PUBLIC) != 0 || (obj.getAccessFlags() & ACC_PROTECTED) != 0; }
/** * Return string representation close to declaration format, * `public static final short MAX = 100', e.g.. * * @return String representation of field, including the signature. */ @Override public final String toString() { String name; String signature; String access; // Short cuts to constant pool // Get names from constant pool access = Utility.accessToString(super.getAccessFlags()); access = access.isEmpty() ? "" : (access + " "); signature = Utility.signatureToString(getSignature()); name = getName(); final StringBuilder buf = new StringBuilder(64); // CHECKSTYLE IGNORE MagicNumber buf.append(access).append(signature).append(" ").append(name); final ConstantValue cv = getConstantValue(); if (cv != null) { buf.append(" = ").append(cv); } for (final Attribute attribute : super.getAttributes()) { if (!(attribute instanceof ConstantValue)) { buf.append(" [").append(attribute).append("]"); } } return buf.toString(); }
/** * Initialize from another object. Note that both objects use the same * references (shallow copy). Use clone() for a physical copy. */ protected FieldOrMethod(FieldOrMethod c) { this(c.getAccessFlags(), c.getNameIndex(), c.getSignatureIndex(), c.getAttributes(), c.getConstantPool()); }
/** * Initialize from another object. Note that both objects use the same * references (shallow copy). Use clone() for a physical copy. */ protected FieldOrMethod(final FieldOrMethod c) { this(c.getAccessFlags(), c.getNameIndex(), c.getSignatureIndex(), c.getAttributes(), c .getConstantPool()); }
final String access = Utility.accessToString(super.getAccessFlags());