Examples of DefaultValue


Examples of br.com.caelum.vraptor.form.annotation.DefaultValue

    }
  }
 
  public ObjectContent orDefault() {
    if(content == null) {
      DefaultValue annotation = new Mirror().on(object.getClass()).reflect().annotation(DefaultValue.class).atField(field);
      content = annotation.value();
    }
    return this;
  }
View Full Code Here

Examples of com.google.gwt.user.client.AsyncProxy.DefaultValue

      sw.outdent();
      sw.println("}");

      boolean allowNonVoid = sourceType.getAnnotation(AllowNonVoid.class) != null;
      for (JMethod method : paramType.getOverridableMethods()) {
        DefaultValue defaults = getDefaultValue(sourceType, method);

        if (method.getReturnType() != JPrimitiveType.VOID && !allowNonVoid) {
          logger.log(TreeLogger.ERROR, "The method " + method.getName()
              + " returns a type other than void, but "
              + sourceType.getQualifiedSourceName() + " does not define the "
View Full Code Here

Examples of com.google.gwt.user.client.AsyncProxy.DefaultValue

    assert false : "Should never reach here";
    return null;
  }

  private DefaultValue getDefaultValue(JClassType sourceType, JMethod method) {
    DefaultValue toReturn = method.getAnnotation(DefaultValue.class);
    if (toReturn == null) {
      toReturn = sourceType.getAnnotation(DefaultValue.class);
    }

    if (toReturn == null) {
View Full Code Here

Examples of com.netflix.paas.config.annotations.DefaultValue

        for (Method method : configClass.getMethods()) {
            Configuration c = method.getAnnotation(Configuration.class);
            if (c == null)
                continue;
            String defaultValue = null;
            DefaultValue dv = method.getAnnotation(DefaultValue.class);
            if (dv != null)
                defaultValue = dv.value();
           
            String name = getPropertyName(method, c);
           
            if (method.getReturnType().isAssignableFrom(Supplier.class)) {
                Type returnType = method.getGenericReturnType();
View Full Code Here

Examples of javax.ws.rs.DefaultValue

      return createParameterExtractor(injectTargetClass, injectTarget, type, genericType, annotations, true);
   }

   public ValueInjector createParameterExtractor(Class injectTargetClass, AccessibleObject injectTarget, Class type, Type genericType, Annotation[] annotations, boolean useDefault)
   {
      DefaultValue defaultValue = findAnnotation(annotations, DefaultValue.class);
      boolean encode = findAnnotation(annotations, Encoded.class) != null || injectTarget.isAnnotationPresent(Encoded.class) || type.isAnnotationPresent(Encoded.class);
      String defaultVal = null;
      if (defaultValue != null) defaultVal = defaultValue.value();

      QueryParam query;
      HeaderParam header;
      MatrixParam matrix;
      PathParam uriParam;
View Full Code Here

Examples of javax.ws.rs.DefaultValue

                            .getInputStream());
         }
         else if (isCookie)
         {
            CookieParam cookieParam = (CookieParam) annotation;
            DefaultValue defaultValue = FindAnnotation.findAnnotation(
                    annotations, DefaultValue.class);
            String defaultVal = null;
            if (defaultValue != null)
               defaultVal = defaultValue.value();

            return new CookieParamInjector(type, genericType, method,
                    cookieParam.value(), defaultVal, annotations, factory).inject(request,
                    null);
         }
View Full Code Here

Examples of javax.ws.rs.DefaultValue

        }
        return httpMethod;
    }

    private String getDefaultValue(Method method) {
        DefaultValue defaultValueAnn = method.getAnnotation(DefaultValue.class);
        if (defaultValueAnn != null) {
            return defaultValueAnn.value();
        }
        return null;
    }
View Full Code Here

Examples of javax.ws.rs.DefaultValue

        return null;
    }

    public static String getDefaultParameterValue(Annotation[] anns) {

        DefaultValue dv = AnnotationUtils.getAnnotation(anns, DefaultValue.class);
        return dv != null ? dv.value() : null;
    }
View Full Code Here

Examples of javax.ws.rs.DefaultValue

                                                          Encoded.class) != null;
        }
    }
   
    private void checkDefaultParameterValue() {
        DefaultValue dv = AnnotationUtils.getMethodAnnotation(annotatedMethod,
                                            DefaultValue.class);
        if (dv == null && classResourceInfo != null) {
            dv = AnnotationUtils.getClassAnnotation(
                                         classResourceInfo.getServiceClass(),
                                         DefaultValue.class);
        }
        if (dv != null) {
            defaultParamValue = dv.value();
        }
    }
View Full Code Here

Examples of javax.ws.rs.DefaultValue

        return null;
    }

    public static String getDefaultParameterValue(Annotation[] anns) {

        DefaultValue dv = AnnotationUtils.getAnnotation(anns, DefaultValue.class);
        return dv != null ? dv.value() : null;
    }
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.