Visit an Attribute. Certain Attributes contribute interest data.

@see GedObjectVisitor#visit(Attribute)
16837
@Override
    public void visit(final Attribute attribute) {
        if ("Restriction".equals(attribute.getString())
                && "confidential".equals(attribute.getTail())) {
            isConfidential = true;
        }
    }
1150895
public void navigateToAttribute(QName attribute) {
        path.addLast(path.getLast().attributes.get(attribute));
    }
466035
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            varName.visit(v);
            if (catchCondition != null) {
                catchCondition.visit(v);
            }
            body.visit(v);
        }
    }
1316506
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            tryBlock.visit(v);
            for (CatchClause cc : getCatchClauses()) {
                cc.visit(v);
            }
            if (finallyBlock != null) {
                finallyBlock.visit(v);
            }
        }
    }
617139
public static void visit(Object instance, TypeToken<?> inspectType, Visitor firstVisitor, Visitor... moreVisitors) {

    try {
      List<Visitor> visitors = ImmutableList.<Visitor>builder().add(firstVisitor).add(moreVisitors).build();

      for (TypeToken<?> type : inspectType.getTypes().classes()) {
        if (Object.class.equals(type.getRawType())) {
          break;
        }

        for (Field field : type.getRawType().getDeclaredFields()) {
          if (!field.isAccessible()) {
            field.setAccessible(true);
          }
          for (Visitor visitor : visitors) {
            visitor.visit(instance, inspectType, type, field);
          }
        }

        for (Method method : type.getRawType().getDeclaredMethods()) {
          if (!method.isAccessible()) {
            method.setAccessible(true);
          }
          for (Visitor visitor : visitors) {
            visitor.visit(instance, inspectType, type, method);
          }
        }
      }
    } catch (Exception e) {
      throw Throwables.propagate(e);
    }
  }
857089
public void setAttribute(final String name, final Attribute attribute) {
        if (name.equals(MAP_KEY)) {
            this.mapAttribute = (MapAttribute) attribute;
        }
    }
22268
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            if (namespace != null) {
                namespace.visit(v);
            }
            propName.visit(v);
        }
    }
750144
def visit_Attribute(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        return '.'.join((self.visit(node.value), node.attr))
591865
private void addToAttributes(final List<ApiAttribute> attributes) {
        for (final ApiObject object : attributes) {
            final ApiModelToGedObjectVisitor visitor = createVisitor();
            object.accept(visitor);
        }
    }
328226
@Override
    public void visit(Field aField) {
        if (aField.isPrivate()) {
            /*
             * private fields are harmless, as long as they are used correctly
             * inside their own class. This should be something the rest of this
             * detector can find out, so do not report them, they might be false
             * positives.
             */
            return;
        }
        String superclassName = getSuperclassName();
        if (!aField.isStatic() && !"java/lang/Enum".equals(superclassName)) {
            return;
        }
        if (!aField.isPublic() && !aField.isProtected()) {
            return;
        }
        ClassDescriptor classOfField = DescriptorFactory.createClassDescriptorFromFieldSignature(aField.getSignature());
        String tBugType = null;
        int priority = aField.isPublic() && aField.isFinal() && aField.getName().equals(aField.getName().toUpperCase())
                && getThisClass().isPublic() ? HIGH_PRIORITY : NORMAL_PRIORITY;
        if (classOfField != null) {
            try {
                if (subtypes2.isSubtype(classOfField, calendarType)) {
                    tBugType = "STCAL_STATIC_CALENDAR_INSTANCE";
                    priority++;
                } else if (subtypes2.isSubtype(classOfField, dateFormatType)) {
                    tBugType = "STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE";
                }
                if (getClassContext().getXClass().usesConcurrency()) {
                    priority--;
                }
                if (tBugType != null) {

                    pendingBugs.put(getXField(), new BugInstance(this, tBugType, priority).addClass(currentClass).addField(this));
                }
            } catch (ClassNotFoundException e) {
                AnalysisContext.reportMissingClass(e);
            }
        }

    }
1071323
def visit_attribute(self, node):
        """"""
        return "%s.%s" % (self._precedence_parens(node, node.expr), node.attrname)
276102
@Override @SuppressWarnings("fallthrough")
    public Void visitAttribute(AttributeTree tree, Void ignore) {
        HtmlTag currTag = tagStack.peek().tag;
        if (currTag != null) {
            Name name = tree.getName();
            HtmlTag.Attr attr = currTag.getAttr(name);
            if (attr != null) {
                boolean first = tagStack.peek().attrs.add(attr);
                if (!first)
                    env.messages.error(HTML, tree, "dc.attr.repeated", name);
            }

            // for now, doclint allows all attribute names beginning with "on" as event handler names,
            // without checking the validity or applicability of the name
            if (!name.toString().startsWith("on")) {
                AttrKind k = currTag.getAttrKind(name);
                switch (k) {
                    case OK:
                        break;

                    case INVALID:
                        env.messages.error(HTML, tree, "dc.attr.unknown", name);
                        break;

                    case OBSOLETE:
                        env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete", name);
                        break;

                    case USE_CSS:
                        env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete.use.css", name);
                        break;
                }
            }

            if (attr != null) {
                switch (attr) {
                    case NAME:
                        if (currTag != HtmlTag.A) {
                            break;
                        }
                        // fallthrough
                    case ID:
                        String value = getAttrValue(tree);
                        if (value == null) {
                            env.messages.error(HTML, tree, "dc.anchor.value.missing");
                        } else {
                            if (!validName.matcher(value).matches()) {
                                env.messages.error(HTML, tree, "dc.invalid.anchor", value);
                            }
                            if (!checkAnchor(value)) {
                                env.messages.error(HTML, tree, "dc.anchor.already.defined", value);
                            }
                        }
                        break;

                    case HREF:
                        if (currTag == HtmlTag.A) {
                            String v = getAttrValue(tree);
                            if (v == null || v.isEmpty()) {
                                env.messages.error(HTML, tree, "dc.attr.lacks.value");
                            } else {
                                Matcher m = docRoot.matcher(v);
                                if (m.matches()) {
                                    String rest = m.group(2);
                                    if (!rest.isEmpty())
                                        checkURI(tree, rest);
                                } else {
                                    checkURI(tree, v);
                                }
                            }
                        }
                        break;

                    case VALUE:
                        if (currTag == HtmlTag.LI) {
                            String v = getAttrValue(tree);
                            if (v == null || v.isEmpty()) {
                                env.messages.error(HTML, tree, "dc.attr.lacks.value");
                            } else if (!validNumber.matcher(v).matches()) {
                                env.messages.error(HTML, tree, "dc.attr.not.number");
                            }
                        }
                        break;
                }
            }
        }

        // TODO: basic check on value

        return super.visitAttribute(tree, ignore);
    }
1040597
@Override
    public void visitEnd() {
        if (name == null  || name.length() == 0) {
            reporter.error("The 'name' attribute of @Model from " + workbench.getType().getClassName() + " must be " +
                    "set");
            return;
        }

        // Check the type of the field
        if (! Type.getDescriptor(Crud.class).equals(node.desc)) {
            reporter.warn("The type of the field " + field + " from " + workbench.getType().getClassName() + " should" +
                    " be " + Crud.class.getName() + " because the field is annotated with @Model");
        }

        Element requires = new Element("requires", "");
        requires.addAttribute(new Attribute("field", field));
        requires.addAttribute(new Attribute("filter", getFilter(name)));

        workbench.getElements().put(requires, null);
    }
631320
@Override
  public FieldVisitor visitField(int access,
                                 String name,
                                 String description,
                                 String signature,
                                 Object value) {
    assert (currentClass != null);
    if (signature == null)
      signature = description + " " + name;
    return currentClass.visitField(access, name, description,
        signature, value);
  }
1177233
public void addAttribute(Attribute attr) {
        if (attr instanceof SourceFileAttr) {
            if (mSource != null) {
                mAttributes.remove(mSource);
            }
            mSource = (SourceFileAttr)attr;
        }
        else if (attr instanceof InnerClassesAttr) {
            if (mInnerClassesAttr != null) {
                mAttributes.remove(mInnerClassesAttr);
            }
            mInnerClassesAttr = (InnerClassesAttr)attr;
        }

        mAttributes.add(attr);
    }
125871
public void insertAttributeAt(Attribute attribute, int i) {
        this.attributesInformation.insertAttributeAt(attribute,i) ;
        if (this.classIndex >= i) {
            this.classIndex++;
        }
    }
280361
@Override
    public void visit(final Attribute attribute) {
        final String string = attribute.getString();
        if ("File".equals(string)) {
            filePath = attribute.getTail();
            for (final GedObject subObject : attribute.getAttributes()) {
                subObject.accept(this);
            }
        }
        if ("Format".equals(string)) {
            format = attribute.getTail();
        }
        if ("Title".equals(string)) {
            title = attribute.getTail();
        }
    }