Example usage for java.lang Class equals

List of usage examples for java.lang Class equals

Introduction

In this page you can find the example usage for java.lang Class equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:net.sf.jooreports.converter.XmlDocumentFormatRegistry.java

private XStream createXStream() {
    XStream xstream = new XStream(new DomDriver());
    xstream.setMode(XStream.NO_REFERENCES);
    xstream.alias("document-format", DocumentFormat.class);
    xstream.aliasField("mime-type", DocumentFormat.class, "mimeType");
    xstream.aliasField("file-extension", DocumentFormat.class, "fileExtension");
    xstream.aliasField("export-filters", DocumentFormat.class, "exportFilters");
    xstream.aliasField("export-options", DocumentFormat.class, "exportOptions");
    xstream.alias("family", DocumentFamily.class);
    xstream.registerConverter(new AbstractBasicConverter() {
        public boolean canConvert(Class type) {
            return type.equals(DocumentFamily.class);
        }// ww w  . j  a  va2  s. c o  m

        protected Object fromString(String name) {
            return DocumentFamily.getFamily(name);
        }
    });
    return xstream;
}

From source file:nz.net.orcon.kanban.security.JcrAuthenticationProvider.java

@Override
public boolean supports(Class<? extends Object> auth) {
    return auth.equals(UsernamePasswordAuthenticationToken.class);
}

From source file:com.seajas.search.profiler.validator.UserValidator.java

/**
 * Determine whether this validator supports the command object.
 * //from  w  ww  . ja  v a2  s.  c  om
 * @param klass
 * @return boolean
 */
@Override
public boolean supports(final Class<?> klass) {
    return klass.equals(UserCommand.class);
}

From source file:org.sloth.validation.UserEditFormValidator.java

@Override
public boolean supports(Class<?> clazz) {
    return clazz.equals(UserEditFormAction.class);
}

From source file:com.seajas.search.attender.validator.UserValidator.java

/**
 * Determine whether this validator supports the command object.
 * //  ww  w . ja  v  a2  s  . c o  m
 * @param klass
 * @return boolean
 */
@Override
@SuppressWarnings("rawtypes")
public boolean supports(final Class klass) {
    return klass.equals(UserCommand.class);
}

From source file:datainstiller.data.DataAliasesConverter.java

@SuppressWarnings("rawtypes")
@Override//from   w ww  . j  a  va  2  s .c  o  m
public boolean canConvert(Class type) {
    return (type.equals(DataAliases.class));
}

From source file:com.mmnaseri.dragonfly.runtime.repo.impl.CrudRepositoryContext.java

public CrudRepositoryContext(ClassLoader classLoader, String... basePackages) {
    //noinspection unchecked
    this.repositories = with(new EntityRepositoryLookupSource(classLoader).getClasses(basePackages))
            .keep(new Filter<Class>() {
                @Override//from   ww  w.j a v a  2  s.  c  o m
                public boolean accepts(Class item) {
                    return !item.equals(EntityRepository.class) && !item.equals(CrudRepository.class)
                            && item.isInterface();
                }
            }).list();
}

From source file:cz.zcu.kiv.eegdatabase.logic.controller.scenario.AddScenarioValidator.java

public boolean supports(Class clazz) {
    return clazz.equals(AddScenarioCommand.class);
}

From source file:com.devicehive.service.helpers.HazelcastHelper.java

public <T extends HazelcastEntity> Predicate prepareFilters(final String guid, final Collection<String> names,
        final Collection<String> devices, final Date timestampSt, final Date timestampEnd, final String status,
        Class<T> entityClass) {
    if (entityClass.equals(DeviceCommand.class)) {
        return prepareFilters(null, guid, devices, null, names, timestampSt, timestampEnd, status);
    }/*  w  w  w  .  j  av  a  2 s  . c  om*/
    if (entityClass.equals(DeviceNotification.class)) {
        return prepareFilters(null, guid, devices, names, null, timestampSt, timestampEnd, status);
    }
    return null;
}

From source file:br.com.joaops.smt.security.SmtAuthenticationProvider.java

@Override
public boolean supports(Class<?> type) {
    return type.equals(UsernamePasswordAuthenticationToken.class);
}