Home | History | Annotate | Download | only in visitor

Lines Matching refs:n2

39     public static boolean equals(final Node n, final Node n2) {
40 return SINGLETON.nodeEquals(n, n2);
43 private <N extends Node> boolean nodesEquals(NodeList<N> n, NodeList<N> n2) {
44 if (n == n2) {
47 if (n == null || n2 == null) {
50 if (n.size() != n2.size()) {
54 if (!nodeEquals(n.get(i), n2.get(i))) {
61 private <T extends Node> boolean nodeEquals(final T n, final T n2) {
62 if (n == n2) {
65 if (n == null || n2 == null) {
68 if (n.getClass() != n2.getClass()) {
71 return n.accept(this, n2);
74 private <T extends Node> boolean nodeEquals(final Optional<T> n, final Optional<T> n2) {
75 return nodeEquals(n.orElse(null), n2.orElse(null));
78 private <T extends Node> boolean nodesEquals(final Optional<NodeList<T>> n, final Optional<NodeList<T>> n2) {
79 return nodesEquals(n.orElse(null), n2.orElse(null));
82 private boolean objEquals(final Object n, final Object n2) {
83 if (n == n2) {
86 if (n == null || n2 == null) {
89 return n.equals(n2);
95 final CompilationUnit n2 = (CompilationUnit) arg;
96 if (!nodesEquals(n.getImports(), n2.getImports()))
98 if (!nodeEquals(n.getModule(), n2.getModule()))
100 if (!nodeEquals(n.getPackageDeclaration(), n2.getPackageDeclaration()))
102 if (!nodesEquals(n.getTypes(), n2.getTypes()))
110 final PackageDeclaration n2 = (PackageDeclaration) arg;
111 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
113 if (!nodeEquals(n.getName(), n2.getName()))
121 final TypeParameter n2 = (TypeParameter) arg;
122 if (!nodeEquals(n.getName(), n2.getName()))
124 if (!nodesEquals(n.getTypeBound(), n2.getTypeBound()))
126 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
146 final ClassOrInterfaceDeclaration n2 = (ClassOrInterfaceDeclaration) arg;
147 if (!nodesEquals(n.getExtendedTypes(), n2.getExtendedTypes()))
149 if (!nodesEquals(n.getImplementedTypes(), n2.getImplementedTypes()))
151 if (!objEquals(n.isInterface(), n2.isInterface()))
153 if (!nodesEquals(n.getTypeParameters(), n2.getTypeParameters()))
155 if (!nodesEquals(n.getMembers(), n2.getMembers()))
157 if (!objEquals(n.getModifiers(), n2.getModifiers()))
159 if (!nodeEquals(n.getName(), n2.getName()))
161 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
169 final EnumDeclaration n2 = (EnumDeclaration) arg;
170 if (!nodesEquals(n.getEntries(), n2.getEntries()))
172 if (!nodesEquals(n.getImplementedTypes(), n2.getImplementedTypes()))
174 if (!nodesEquals(n.getMembers(), n2.getMembers()))
176 if (!objEquals(n.getModifiers(), n2.getModifiers()))
178 if (!nodeEquals(n.getName(), n2.getName()))
180 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
188 final EnumConstantDeclaration n2 = (EnumConstantDeclaration) arg;
189 if (!nodesEquals(n.getArguments(), n2.getArguments()))
191 if (!nodesEquals(n.getClassBody(), n2.getClassBody()))
193 if (!nodeEquals(n.getName(), n2.getName()))
195 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
203 final AnnotationDeclaration n2 = (AnnotationDeclaration) arg;
204 if (!nodesEquals(n.getMembers(), n2.getMembers()))
206 if (!objEquals(n.getModifiers(), n2.getModifiers()))
208 if (!nodeEquals(n.getName(), n2.getName()))
210 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
218 final AnnotationMemberDeclaration n2 = (AnnotationMemberDeclaration) arg;
219 if (!nodeEquals(n.getDefaultValue(), n2.getDefaultValue()))
221 if (!objEquals(n.getModifiers(), n2.getModifiers()))
223 if (!nodeEquals(n.getName(), n2.getName()))
225 if (!nodeEquals(n.getType(), n2.getType()))
227 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
235 final FieldDeclaration n2 = (FieldDeclaration) arg;
236 if (!objEquals(n.getModifiers(), n2.getModifiers()))
238 if (!nodesEquals(n.getVariables(), n2.getVariables()))
240 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
248 final VariableDeclarator n2 = (VariableDeclarator) arg;
249 if (!nodeEquals(n.getInitializer(), n2.getInitializer()))
251 if (!nodeEquals(n.getName(), n2.getName()))
253 if (!nodeEquals(n.getType(), n2.getType()))
261 final ConstructorDeclaration n2 = (ConstructorDeclaration) arg;
262 if (!nodeEquals(n.getBody(), n2.getBody()))
264 if (!objEquals(n.getModifiers(), n2.getModifiers()))
266 if (!nodeEquals(n.getName(), n2.getName()))
268 if (!nodesEquals(n.getParameters(), n2.getParameters()))
270 if (!nodeEquals(n.getReceiverParameter(), n2.getReceiverParameter()))
272 if (!nodesEquals(n.getThrownExceptions(), n2.getThrownExceptions()))
274 if (!nodesEquals(n.getTypeParameters(), n2.getTypeParameters()))
276 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
284 final MethodDeclaration n2 = (MethodDeclaration) arg;
285 if (!nodeEquals(n.getBody(), n2.getBody()))
287 if (!nodeEquals(n.getType(), n2.getType()))
289 if (!objEquals(n.getModifiers(), n2.getModifiers()))
291 if (!nodeEquals(n.getName(), n2.getName()))
293 if (!nodesEquals(n.getParameters(), n2.getParameters()))
295 if (!nodeEquals(n.getReceiverParameter(), n2.getReceiverParameter()))
297 if (!nodesEquals(n.getThrownExceptions(), n2.getThrownExceptions()))
299 if (!nodesEquals(n.getTypeParameters(), n2.getTypeParameters()))
301 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
309 final Parameter n2 = (Parameter) arg;
310 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
312 if (!objEquals(n.isVarArgs(), n2.isVarArgs()))
314 if (!objEquals(n.getModifiers(), n2.getModifiers()))
316 if (!nodeEquals(n.getName(), n2.getName()))
318 if (!nodeEquals(n.getType(), n2.getType()))
320 if (!nodesEquals(n.getVarArgsAnnotations(), n2.getVarArgsAnnotations()))
328 final InitializerDeclaration n2 = (InitializerDeclaration) arg;
329 if (!nodeEquals(n.getBody(), n2.getBody()))
331 if (!objEquals(n.isStatic(), n2.isStatic()))
333 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
347 final ClassOrInterfaceType n2 = (ClassOrInterfaceType) arg;
348 if (!nodeEquals(n.getName(), n2.getName()))
350 if (!nodeEquals(n.getScope(), n2.getScope()))
352 if (!nodesEquals(n.getTypeArguments(), n2.getTypeArguments()))
354 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
362 final PrimitiveType n2 = (PrimitiveType) arg;
363 if (!objEquals(n.getType(), n2.getType()))
365 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
373 final ArrayType n2 = (ArrayType) arg;
374 if (!nodeEquals(n.getComponentType(), n2.getComponentType()))
376 if (!objEquals(n.getOrigin(), n2.getOrigin()))
378 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
386 final ArrayCreationLevel n2 = (ArrayCreationLevel) arg;
387 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
389 if (!nodeEquals(n.getDimension(), n2.getDimension()))
397 final IntersectionType n2 = (IntersectionType) arg;
398 if (!nodesEquals(n.getElements(), n2.getElements()))
400 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
408 final UnionType n2 = (UnionType) arg;
409 if (!nodesEquals(n.getElements(), n2.getElements()))
411 if (!nodesEquals(n.getAnnotations(), n2
419 final VoidType n2 = (VoidType) arg;
420 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
428 final WildcardType n2 = (WildcardType) arg;
429 if (!nodeEquals(n.getExtendedType(), n2.getExtendedType()))
431 if (!nodeEquals(n.getSuperType(), n2.getSuperType()))
433 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
441 final UnknownType n2 = (UnknownType) arg;
442 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
450 final ArrayAccessExpr n2 = (ArrayAccessExpr) arg;
451 if (!nodeEquals(n.getIndex(), n2.getIndex()))
453 if (!nodeEquals(n.getName(), n2.getName()))
461 final ArrayCreationExpr n2 = (ArrayCreationExpr) arg;
462 if (!nodeEquals(n.getElementType(), n2.getElementType()))
464 if (!nodeEquals(n.getInitializer(), n2.getInitializer()))
466 if (!nodesEquals(n.getLevels(), n2.getLevels()))
474 final ArrayInitializerExpr n2 = (ArrayInitializerExpr) arg;
475 if (!nodesEquals(n.getValues(), n2.getValues()))
483 final AssignExpr n2 = (AssignExpr) arg;
484 if (!objEquals(n.getOperator(), n2.getOperator()))
486 if (!nodeEquals(n.getTarget(), n2.getTarget()))
488 if (!nodeEquals(n.getValue(), n2.getValue()))
496 final BinaryExpr n2 = (BinaryExpr) arg;
497 if (!nodeEquals(n.getLeft(), n2.getLeft()))
499 if (!objEquals(n.getOperator(), n2.getOperator()))
501 if (!nodeEquals(n.getRight(), n2.getRight()))
509 final CastExpr n2 = (CastExpr) arg;
510 if (!nodeEquals(n.getExpression(), n2.getExpression()))
512 if (!nodeEquals(n.getType(), n2.getType()))
520 final ClassExpr n2 = (ClassExpr) arg;
521 if (!nodeEquals(n.getType(), n2.getType()))
529 final ConditionalExpr n2 = (ConditionalExpr) arg;
530 if (!nodeEquals(n.getCondition(), n2.getCondition()))
532 if (!nodeEquals(n.getElseExpr(), n2.getElseExpr()))
534 if (!nodeEquals(n.getThenExpr(), n2.getThenExpr()))
542 final EnclosedExpr n2 = (EnclosedExpr) arg;
543 if (!nodeEquals(n.getInner(), n2.getInner()))
551 final FieldAccessExpr n2 = (FieldAccessExpr) arg;
552 if (!nodeEquals(n.getName(), n2.getName()))
554 if (!nodeEquals(n.getScope(), n2.getScope()))
556 if (!nodesEquals(n.getTypeArguments(), n2.getTypeArguments()))
564 final InstanceOfExpr n2 = (InstanceOfExpr) arg;
565 if (!nodeEquals(n.getExpression(), n2.getExpression()))
567 if (!nodeEquals(n.getType(), n2.getType()))
575 final StringLiteralExpr n2 = (StringLiteralExpr) arg;
576 if (!objEquals(n.getValue(), n2.getValue()))
584 final IntegerLiteralExpr n2 = (IntegerLiteralExpr) arg;
585 if (!objEquals(n.getValue(), n2.getValue()))
593 final LongLiteralExpr n2 = (LongLiteralExpr) arg;
594 if (!objEquals(n.getValue(), n2.getValue()))
602 final CharLiteralExpr n2 = (CharLiteralExpr) arg;
603 if (!objEquals(n.getValue(), n2.getValue()))
611 final DoubleLiteralExpr n2 = (DoubleLiteralExpr) arg;
612 if (!objEquals(n.getValue(), n2.getValue()))
620 final BooleanLiteralExpr n2 = (BooleanLiteralExpr) arg;
621 if (!objEquals(n.getValue(), n2.getValue()))
635 final MethodCallExpr n2 = (MethodCallExpr) arg;
636 if (!nodesEquals(n.getArguments(), n2.getArguments()))
638 if (!nodeEquals(n.getName(), n2.getName()))
640 if (!nodeEquals(n.getScope(), n2.getScope()))
642 if (!nodesEquals(n.getTypeArguments(), n2.getTypeArguments()))
650 final NameExpr n2 = (NameExpr) arg;
651 if (!nodeEquals(n.getName(), n2.getName()))
659 final ObjectCreationExpr n2 = (ObjectCreationExpr) arg;
660 if (!nodesEquals(n.getAnonymousClassBody(), n2.getAnonymousClassBody()))
662 if (!nodesEquals(n.getArguments(), n2.getArguments()))
664 if (!nodeEquals(n.getScope(), n2.getScope()))
666 if (!nodeEquals(n.getType(), n2.getType()))
668 if (!nodesEquals(n.getTypeArguments(), n2.getTypeArguments()))
676 final Name n2 = (Name) arg;
677 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
679 if (!objEquals(n.getIdentifier(), n2.getIdentifier()))
681 if (!nodeEquals(n.getQualifier(), n2.getQualifier()))
689 final SimpleName n2 = (SimpleName) arg;
690 if (!objEquals(n.getIdentifier(), n2.getIdentifier()))
698 final ThisExpr n2 = (ThisExpr) arg;
699 if (!nodeEquals(n.getClassExpr(), n2.getClassExpr()))
707 final SuperExpr n2 = (SuperExpr) arg;
708 if (!nodeEquals(n.getClassExpr(), n2.getClassExpr()))
716 final UnaryExpr n2 = (UnaryExpr) arg;
717 if (!nodeEquals(n.getExpression(), n2.getExpression()))
719 if (!objEquals(n.getOperator(), n2.getOperator()))
727 final VariableDeclarationExpr n2 = (VariableDeclarationExpr) arg;
728 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
730 if (!objEquals(n.getModifiers(), n2.getModifiers()))
732 if (!nodesEquals(n.getVariables(), n2.getVariables()))
740 final MarkerAnnotationExpr n2 = (MarkerAnnotationExpr) arg;
741 if (!nodeEquals(n.getName(), n2.getName()))
749 final SingleMemberAnnotationExpr n2 = (SingleMemberAnnotationExpr) arg;
750 if (!nodeEquals(n.getMemberValue(), n2.getMemberValue()))
752 if (!nodeEquals(n.getName(), n2.getName()))
760 final NormalAnnotationExpr n2 = (NormalAnnotationExpr) arg;
761 if (!nodesEquals(n.getPairs(), n2.getPairs()))
763 if (!nodeEquals(n.getName(), n2.getName()))
771 final MemberValuePair n2 = (MemberValuePair) arg;
772 if (!nodeEquals(n.getName(), n2.getName()))
774 if (!nodeEquals(n.getValue(), n2.getValue()))
782 final ExplicitConstructorInvocationStmt n2 = (ExplicitConstructorInvocationStmt) arg;
783 if (!nodesEquals(n.getArguments(), n2.getArguments()))
785 if (!nodeEquals(n.getExpression(), n2.getExpression()))
787 if (!objEquals(n.isThis(), n2.isThis()))
789 if (!nodesEquals(n.getTypeArguments(), n2.getTypeArguments()))
797 final LocalClassDeclarationStmt n2 = (LocalClassDeclarationStmt) arg;
798 if (!nodeEquals(n.getClassDeclaration(), n2.getClassDeclaration()))
806 final AssertStmt n2 = (AssertStmt) arg;
807 if (!nodeEquals(n.getCheck(), n2.getCheck()))
809 if (!nodeEquals(n.getMessage(), n2.getMessage()))
817 final BlockStmt n2 = (BlockStmt) arg;
818 if (!nodesEquals(n.getStatements(), n2.getStatements()))
826 final LabeledStmt n2 = (LabeledStmt) arg;
827 if (!nodeEquals(n.getLabel(), n2.getLabel()))
829 if (!nodeEquals(n.getStatement(), n2.getStatement()))
843 final ExpressionStmt n2 = (ExpressionStmt) arg;
844 if (!nodeEquals(n.getExpression(), n2.getExpression()))
852 final SwitchStmt n2 = (SwitchStmt) arg;
853 if (!nodesEquals(n.getEntries(), n2.getEntries()))
855 if (!nodeEquals(n.getSelector(), n2.getSelector()))
863 final SwitchEntryStmt n2 = (SwitchEntryStmt) arg;
864 if (!nodeEquals(n.getLabel(), n2.getLabel()))
866 if (!nodesEquals(n.getStatements(), n2.getStatements()))
874 final BreakStmt n2 = (BreakStmt) arg;
875 if (!nodeEquals(n.getLabel(), n2.getLabel()))
883 final ReturnStmt n2 = (ReturnStmt) arg;
884 if (!nodeEquals(n.getExpression(), n2.getExpression()))
892 final IfStmt n2 = (IfStmt) arg;
893 if (!nodeEquals(n.getCondition(), n2.getCondition()))
895 if (!nodeEquals(n.getElseStmt(), n2.getElseStmt()))
897 if (!nodeEquals(n.getThenStmt(), n2.getThenStmt()))
905 final WhileStmt n2 = (WhileStmt) arg;
906 if (!nodeEquals(n.getBody(), n2.getBody()))
908 if (!nodeEquals(n.getCondition(), n2.getCondition()))
916 final ContinueStmt n2 = (ContinueStmt) arg;
917 if (!nodeEquals(n.getLabel(), n2.getLabel()))
925 final DoStmt n2 = (DoStmt) arg;
926 if (!nodeEquals(n.getBody(), n2.getBody()))
928 if (!nodeEquals(n.getCondition(), n2.getCondition()))
936 final ForeachStmt n2 = (ForeachStmt) arg;
937 if (!nodeEquals(n.getBody(), n2.getBody()))
939 if (!nodeEquals(n.getIterable(), n2.getIterable()))
941 if (!nodeEquals(n.getVariable(), n2.getVariable()))
949 final ForStmt n2 = (ForStmt) arg;
950 if (!nodeEquals(n.getBody(), n2.getBody()))
952 if (!nodeEquals(n.getCompare(), n2.getCompare()))
954 if (!nodesEquals(n.getInitialization(), n2.getInitialization()))
956 if (!nodesEquals(n.getUpdate(), n2.getUpdate()))
964 final ThrowStmt n2 = (ThrowStmt) arg;
965 if (!nodeEquals(n.getExpression(), n2.getExpression()))
973 final SynchronizedStmt n2 = (SynchronizedStmt) arg;
974 if (!nodeEquals(n.getBody(), n2.getBody()))
976 if (!nodeEquals(n.getExpression(), n2.getExpression()))
984 final TryStmt n2 = (TryStmt) arg;
985 if (!nodesEquals(n.getCatchClauses(), n2.getCatchClauses()))
987 if (!nodeEquals(n.getFinallyBlock(), n2.getFinallyBlock()))
989 if (!nodesEquals(n.getResources(), n2.getResources()))
991 if (!nodeEquals(n.getTryBlock(), n2.getTryBlock()))
999 final CatchClause n2 = (CatchClause) arg;
1000 if (!nodeEquals(n.getBody(), n2.getBody()))
1002 if (!nodeEquals(n.getParameter(), n2.getParameter()))
1010 final LambdaExpr n2 = (LambdaExpr) arg;
1011 if (!nodeEquals(n.getBody(), n2.getBody()))
1013 if (!objEquals(n.isEnclosingParameters(), n2.isEnclosingParameters()))
1015 if (!nodesEquals(n.getParameters(), n2.getParameters()))
1023 final MethodReferenceExpr n2 = (MethodReferenceExpr) arg;
1024 if (!objEquals(n.getIdentifier(), n2.getIdentifier()))
1026 if (!nodeEquals(n.getScope(), n2.getScope()))
1028 if (!nodesEquals(n.getTypeArguments(), n2.getTypeArguments()))
1036 final TypeExpr n2 = (TypeExpr) arg;
1037 if (!nodeEquals(n.getType(), n2.getType()))
1045 final ImportDeclaration n2 = (ImportDeclaration) arg;
1046 if (!objEquals(n.isAsterisk(), n2.isAsterisk()))
1048 if (!objEquals(n.isStatic(), n2.isStatic()))
1050 if (!nodeEquals(n.getName(), n2.getName()))
1063 final ModuleDeclaration n2 = (ModuleDeclaration) arg;
1064 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
1066 if (!objEquals(n.isOpen(), n2.isOpen()))
1068 if (!nodesEquals(n.getModuleStmts(), n2.getModuleStmts()))
1070 if (!nodeEquals(n.getName(), n2.getName()))
1078 final ModuleRequiresStmt n2 = (ModuleRequiresStmt) arg;
1079 if (!objEquals(n.getModifiers(), n2.getModifiers()))
1081 if (!nodeEquals(n.getName(), n2.getName()))
1089 final ModuleExportsStmt n2 = (ModuleExportsStmt) arg;
1090 if (!nodesEquals(n.getModuleNames(), n2.getModuleNames()))
1092 if (!nodeEquals(n.getName(), n2.getName()))
1100 final ModuleProvidesStmt n2 = (ModuleProvidesStmt) arg;
1101 if (!nodeEquals(n.getType(), n2.getType()))
1103 if (!nodesEquals(n.getWithTypes(), n2.getWithTypes()))
1111 final ModuleUsesStmt n2 = (ModuleUsesStmt) arg;
1112 if (!nodeEquals(n.getType(), n2.getType()))
1120 final ModuleOpensStmt n2 = (ModuleOpensStmt) arg;
1121 if (!nodesEquals(n.getModuleNames(), n2.getModuleNames()))
1123 if (!nodeEquals(n.getName(), n2.getName()))
1137 final ReceiverParameter n2 = (ReceiverParameter) arg;
1138 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))
1140 if (!nodeEquals(n.getName(), n2.getName()))
1142 if (!nodeEquals(n.getType(), n2.getType()))
1149 final VarType n2 = (VarType) arg;
1150 if (!nodesEquals(n.getAnnotations(), n2.getAnnotations()))