/** * Adds a type declaration to the current marker. */ public void markTypeNode(Node typeNode, int lineno, int startCharno, int endLineno, int endCharno, boolean hasLC) { if (currentMarker != null) { JSDocInfo.TypePosition position = new JSDocInfo.TypePosition(); position.setItem(typeNode); position.setHasBrackets(hasLC); position.setPositionInformation(lineno, startCharno, endLineno, endCharno); currentMarker.setType(position); } }
private static boolean areEquivalent(Marker m1, Marker m2) { if (m1 == null && m2 == null) { return true; } if ((m1 == null && m2 != null) || (m1 != null && m2 == null)) { return false; } return TrimmedStringPosition.areEquivalent(m1.annotation, m2.annotation) && TrimmedStringPosition.areEquivalent(m1.name, m2.name) && NamePosition.areEquivalent(m1.nameNode, m2.nameNode) && StringPosition.areEquivalent(m1.description, m2.description) && TypePosition.areEquivalent(m1.type, m2.type); } }
static boolean areEquivalent(TypePosition p1, TypePosition p2) { if (p1 == null && p2 == null) { return true; } if ((p1 == null && p2 != null) || (p1 != null && p2 == null)) { return false; } if ((p1.getItem() == null && p2.getItem() != null) || (p1.getItem() != null && p2.getItem() == null)) { return false; } return ((p1.getItem() == null && p2.getItem() == null) || p1.getItem().isEquivalentTo(p2.getItem())) && p1.getStartLine() == p2.getStartLine() && p1.getPositionOnStartLine() == p2.getPositionOnStartLine() && p1.getEndLine() == p2.getEndLine() && p1.getPositionOnEndLine() == p2.getPositionOnEndLine() && p1.brackets == p2.brackets; } }
static boolean areEquivalent(TypePosition p1, TypePosition p2) { if (p1 == null && p2 == null) { return true; } if ((p1 == null && p2 != null) || (p1 != null && p2 == null)) { return false; } if ((p1.getItem() == null && p2.getItem() != null) || (p1.getItem() != null && p2.getItem() == null)) { return false; } return (p1.getItem() == null && p2.getItem() == null || p1.getItem().isEquivalentTo(p2.getItem())) && p1.getStartLine() == p2.getStartLine() && p1.getPositionOnStartLine() == p2.getPositionOnStartLine() && p1.getEndLine() == p2.getEndLine() && p1.getPositionOnEndLine() == p2.getPositionOnEndLine() && p1.brackets == p2.brackets; } }
/** * Adds a type declaration to the current marker. */ public void markTypeNode(Node typeNode, int lineno, int startCharno, int endLineno, int endCharno, boolean hasLC) { if (currentMarker != null) { JSDocInfo.TypePosition position = new JSDocInfo.TypePosition(); position.setItem(typeNode); position.setHasBrackets(hasLC); position.setPositionInformation(lineno, startCharno, endLineno, endCharno); currentMarker.setType(position); } }
private static boolean areEquivalent(Marker m1, Marker m2) { if (m1 == null && m2 == null) { return true; } if ((m1 == null && m2 != null) || (m1 != null && m2 == null)) { return false; } return TrimmedStringPosition.areEquivalent(m1.annotation, m2.annotation) && NamePosition.areEquivalent(m1.nameNode, m2.nameNode) && StringPosition.areEquivalent(m1.description, m2.description) && TypePosition.areEquivalent(m1.type, m2.type); } }