@Override public boolean equals(final Object obj) { return obj instanceof Named && CDIAnnotationUtils.equals(this, (Annotation) obj); } };
@Override public boolean equals(final Object obj) { if (!(obj instanceof AnnotationWrapper)) { return false; } final AnnotationWrapper other = (AnnotationWrapper) obj; return CDIAnnotationUtils.equals(anno, other.anno); }
@Override public boolean equals(final Object obj) { return obj instanceof Named && CDIAnnotationUtils.equals(this, (Annotation) obj); } };
/** * Helper method for comparing two arrays of annotations. * * @param a1 the first array * @param a2 the second array * @return a flag whether these arrays are equal */ private static boolean annotationArrayMemberEquals(Annotation[] a1, Annotation[] a2) { if (a1.length != a2.length) { return false; } for (int i = 0; i < a1.length; i++) { if (!equals(a1[i], a2[i])) { return false; } } return true; }
/** * Helper method for comparing two arrays of annotations. * * @param a1 the first array * @param a2 the second array * @return a flag whether these arrays are equal */ private static boolean annotationArrayMemberEquals(Annotation[] a1, Annotation[] a2) { if (a1.length != a2.length) { return false; } for (int i = 0; i < a1.length; i++) { if (!equals(a1[i], a2[i])) { return false; } } return true; }
@Override public boolean equals(Object obj) { if (!(obj instanceof Decorable)) { return false; } final Decorable other = (Decorable) obj; return decorableType.equals(other.decorableType) && CDIAnnotationUtils.equals(annotation, other.annotation) && annotated.equals(other.annotated) && injectable.equals(other.injectable); }
/** * Helper method for checking whether two objects of the given type are * equal. This method is used to compare the parameters of two annotation * instances. * * @param type the type of the objects to be compared * @param o1 the first object * @param o2 the second object * @return a flag whether these objects are equal */ private static boolean memberEquals(Class<?> type, Object o1, Object o2) { if (o1 == o2) { return true; } if (o1 == null || o2 == null) { return false; } if (type.isArray()) { return arrayMemberEquals(type.getComponentType(), o1, o2); } if (type.isAnnotation()) { return equals((Annotation) o1, (Annotation) o2); } return o1.equals(o2); }
/** * Helper method for checking whether two objects of the given type are * equal. This method is used to compare the parameters of two annotation * instances. * * @param type the type of the objects to be compared * @param o1 the first object * @param o2 the second object * @return a flag whether these objects are equal */ private static boolean memberEquals(Class<?> type, Object o1, Object o2) { if (o1 == o2) { return true; } if (o1 == null || o2 == null) { return false; } if (type.isArray()) { return arrayMemberEquals(type.getComponentType(), o1, o2); } if (type.isAnnotation()) { return equals((Annotation) o1, (Annotation) o2); } return o1.equals(o2); }