Examples of locator()


Examples of com.google.gwt.requestfactory.shared.Service.locator()

    // Look at the RequestContext
    Class<?> requestContextClass = contextMethod.getDeclaringClass();
    Service l = requestContextClass.getAnnotation(Service.class);
    ServiceName ln = requestContextClass.getAnnotation(ServiceName.class);
    if (l != null && !ServiceLocator.class.equals(l.locator())) {
      locatorType = l.locator();
    } else if (ln != null && ln.locator().length() > 0) {
      try {
        locatorType =
            Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(
View Full Code Here

Examples of com.google.gwt.requestfactory.shared.Service.locator()

    // Look at the RequestContext
    Class<?> requestContextClass = contextMethod.getDeclaringClass();
    Service l = requestContextClass.getAnnotation(Service.class);
    ServiceName ln = requestContextClass.getAnnotation(ServiceName.class);
    if (l != null && !ServiceLocator.class.equals(l.locator())) {
      locatorType = l.locator();
    } else if (ln != null && ln.locator().length() > 0) {
      try {
        locatorType =
            Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(
                ServiceLocator.class);
View Full Code Here

Examples of com.google.gwt.requestfactory.shared.ServiceName.locator()

    Class<?> requestContextClass = contextMethod.getDeclaringClass();
    Service l = requestContextClass.getAnnotation(Service.class);
    ServiceName ln = requestContextClass.getAnnotation(ServiceName.class);
    if (l != null && !ServiceLocator.class.equals(l.locator())) {
      locatorType = l.locator();
    } else if (ln != null && ln.locator().length() > 0) {
      try {
        locatorType = Class.forName(ln.locator(), false,
            requestContextClass.getClassLoader()).asSubclass(
            ServiceLocator.class);
      } catch (ClassNotFoundException e) {
View Full Code Here

Examples of com.google.gwt.requestfactory.shared.ServiceName.locator()

    ServiceName ln = requestContextClass.getAnnotation(ServiceName.class);
    if (l != null && !ServiceLocator.class.equals(l.locator())) {
      locatorType = l.locator();
    } else if (ln != null && ln.locator().length() > 0) {
      try {
        locatorType = Class.forName(ln.locator(), false,
            requestContextClass.getClassLoader()).asSubclass(
            ServiceLocator.class);
      } catch (ClassNotFoundException e) {
        return die(
            e,
View Full Code Here

Examples of com.google.gwt.requestfactory.shared.ServiceName.locator()

    Class<?> requestContextClass = contextMethod.getDeclaringClass();
    Service l = requestContextClass.getAnnotation(Service.class);
    ServiceName ln = requestContextClass.getAnnotation(ServiceName.class);
    if (l != null && !ServiceLocator.class.equals(l.locator())) {
      locatorType = l.locator();
    } else if (ln != null && ln.locator().length() > 0) {
      try {
        locatorType =
            Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(
                ServiceLocator.class);
      } catch (ClassNotFoundException e) {
View Full Code Here

Examples of com.google.gwt.requestfactory.shared.ServiceName.locator()

    if (l != null && !ServiceLocator.class.equals(l.locator())) {
      locatorType = l.locator();
    } else if (ln != null && ln.locator().length() > 0) {
      try {
        locatorType =
            Class.forName(ln.locator(), false, getTop().getDomainClassLoader()).asSubclass(
                ServiceLocator.class);
      } catch (ClassNotFoundException e) {
        return die(e, "Could not find the locator type specified in the @%s annotation %s",
            ServiceName.class.getCanonicalName(), ln.value());
      }
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.ProxyFor.locator()

  private boolean hasProxyLocator(TypeElement x, State state) {
    ProxyFor proxyFor = x.getAnnotation(ProxyFor.class);
    if (proxyFor != null) {
      // See javadoc on getAnnotation
      try {
        proxyFor.locator();
        throw new RuntimeException("Should not reach here");
      } catch (MirroredTypeException expected) {
        TypeMirror locatorType = expected.getTypeMirror();
        return !state.types.asElement(locatorType).equals(state.locatorType.asElement());
      }
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.ProxyFor.locator()

  private boolean hasProxyLocator(TypeElement x, State state) {
    ProxyFor proxyFor = x.getAnnotation(ProxyFor.class);
    if (proxyFor != null) {
      // See javadoc on getAnnotation
      try {
        proxyFor.locator();
        throw new RuntimeException("Should not reach here");
      } catch (MirroredTypeException expected) {
        TypeMirror locatorType = expected.getTypeMirror();
        return !state.types.asElement(locatorType).equals(state.locatorType.asElement());
      }
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.ProxyFor.locator()

        assertTrue(EntityProxy.class.isAssignableFrom(EmployeeProxy.class));

        ProxyFor proxyAnnotation = EmployeeProxy.class.getAnnotation(ProxyFor.class);
        assertEquals(proxyAnnotation.value(), Employee.class);
        assertEquals(proxyAnnotation.locator(), EmployeeLocator.class);
    }

    @Test(expected = NoSuchMethodException.class)
    public void shouldNotGenerateFilteredMethods() throws NoSuchMethodException {
        Class<?> proxyClass = EmployeeProxy.class;
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.ProxyFor.locator()

    // Check it for annotations
    Class<? extends Locator<?, ?>> locatorType;
    ProxyFor l = proxyType.getAnnotation(ProxyFor.class);
    ProxyForName ln = proxyType.getAnnotation(ProxyForName.class);
    if (l != null && !Locator.class.equals(l.locator())) {
      @SuppressWarnings("unchecked")
      Class<? extends Locator<?, ?>> found = (Class<? extends Locator<?, ?>>) l.locator();
      locatorType = found;
    } else if (ln != null && ln.locator().length() > 0) {
      try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.