List of usage examples for java.lang Class equals
public boolean equals(Object obj)
From source file:org.openmrs.module.usagestatistics.validator.OptionsValidator.java
/** * @see org.springframework.validation.Validator#supports(Class) *///w w w .jav a 2 s. c o m @SuppressWarnings("unchecked") public boolean supports(Class clazz) { return clazz.equals(Options.class); }
From source file:org.jasig.portlets.FeedbackPortlet.web.FeedbackValidator.java
public boolean supports(Class givenClass) { return givenClass.equals(SubmitFeedbackForm.class); }
From source file:sample.contact.web.validator.WebUserValidator.java
@SuppressWarnings("unchecked") public boolean supports(Class clazz) { return clazz.equals(WebUser.class); }
From source file:net.ripe.rpki.commons.xml.converters.URIConverter.java
@Override @SuppressWarnings("rawtypes") public boolean canConvert(Class type) { return type.equals(URI.class); }
From source file:com.springframework.core.annotation.AnnotationUtils.java
/** * Find the first {@link Class} in the inheritance hierarchy of the specified * {@code clazz} (including the specified {@code clazz} itself) which declares * at least one of the specified {@code annotationTypes}, or {@code null} if * none of the specified annotation types could be found. * <p>If the supplied {@code clazz} is {@code null}, {@code null} will be * returned./*from w w w . j a v a 2 s .co m*/ * <p>If the supplied {@code clazz} is an interface, only the interface itself * will be checked; the inheritance hierarchy for interfaces will not be traversed. * <p>Meta-annotations will <em>not</em> be searched. * <p>The standard {@link Class} API does not provide a mechanism for determining * which class in an inheritance hierarchy actually declares one of several * candidate {@linkplain Annotation annotations}, so we need to handle this * explicitly. * @param annotationTypes the list of Class objects corresponding to the * annotation types * @param clazz the Class object corresponding to the class on which to check * for the annotations, or {@code null} * @return the first {@link Class} in the inheritance hierarchy of the specified * {@code clazz} which declares an annotation of at least one of the specified * {@code annotationTypes}, or {@code null} if not found * @since 3.2.2 * @see Class#isAnnotationPresent(Class) * @see Class#getDeclaredAnnotations() * @see #findAnnotationDeclaringClass(Class, Class) * @see #isAnnotationDeclaredLocally(Class, Class) */ public static Class<?> findAnnotationDeclaringClassForTypes(List<Class<? extends Annotation>> annotationTypes, Class<?> clazz) { Assert.notEmpty(annotationTypes, "The list of annotation types must not be empty"); if (clazz == null || clazz.equals(Object.class)) { return null; } for (Class<? extends Annotation> annotationType : annotationTypes) { if (isAnnotationDeclaredLocally(annotationType, clazz)) { return clazz; } } return findAnnotationDeclaringClassForTypes(annotationTypes, clazz.getSuperclass()); }
From source file:net.sourceforge.subsonic.validator.SavePlaylistValidator.java
public boolean supports(Class clazz) { return clazz.equals(SavePlaylistCommand.class); }
From source file:com.firstclarity.magnolia.study.blossom.sample.ContactFormValidator.java
@Override public boolean supports(Class clazz) { return clazz.equals(ContactForm.class); }
From source file:nl.conspect.legacy.domain.UserValidator.java
public boolean supports(Class clazz) { return clazz.equals(NewUserRegistrationForm.class); }
From source file:org.openmrs.module.appointmentscheduling.validator.AppointmentStatusHistoryValidator.java
/** * Determines if the command object being submitted is a valid type * //from w w w . j ava2 s .co m * @see org.springframework.validation.Validator#supports(java.lang.Class) */ @SuppressWarnings("unchecked") public boolean supports(Class c) { return c.equals(AppointmentStatusHistory.class); }
From source file:org.sloth.validation.LoginValidator.java
@Override public boolean supports(Class<?> clazz) { return clazz.equals(Login.class); }