Examples of AnnotatedClass


Examples of com.almende.util.AnnotationUtil.AnnotatedClass

   */
  static public List<String> validate (Class<?> c, RequestParams requestParams) {
    List<String> errors = new ArrayList<String>();
    Set<String> methodNames = new HashSet<String>();
   
    AnnotatedClass ac = AnnotationUtil.get(c);
    for (AnnotatedMethod method : ac.getMethods()) {
      boolean available = isAvailable(method, requestParams);       
      if (available) {
        // The method name may only occur once
        String name = method.getName();
        if (methodNames.contains(name)) {
View Full Code Here

Examples of com.almende.util.AnnotationUtil.AnnotatedClass

      Map<String, Object> methods = new TreeMap<String, Object>();
      if (asJSON == null) {
        asJSON = false;
      }

      AnnotatedClass annotatedClass = AnnotationUtil.get(c);
      for (AnnotatedMethod method : annotatedClass.getMethods()) {
        if (isAvailable(method, requestParams)) {
          if (asJSON) {
            // format as JSON
            List<Object> descParams = new ArrayList<Object>();
            for(AnnotatedParam param : method.getParams()){
View Full Code Here

Examples of com.almende.util.AnnotationUtil.AnnotatedClass

   * @param requestParams
   * @return methodType   meta information on the method, or null if not found
   */
  static private AnnotatedMethod getMethod(Class<?> objectClass, String method,
      RequestParams requestParams) {
    AnnotatedClass annotatedClass = AnnotationUtil.get(objectClass);
    List<AnnotatedMethod> methods = annotatedClass.getMethods(method);
    for (AnnotatedMethod m : methods) {
      if (isAvailable(m, requestParams)) {
        return m;
      }
    }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.map.introspect.AnnotatedClass

         * 29-Jul-2009, tatu: Also, we do NOT ignore annotations here, even
         *    if Feature.USE_ANNOTATIONS was disabled, since caller
         *    specifically requested annotations to be added with this call
         */
        AnnotationIntrospector ai = getAnnotationIntrospector();
        AnnotatedClass ac = AnnotatedClass.construct(cls, ai, null);
        _base = _base.withVisibilityChecker(ai.findAutoDetectVisibility(ac,
                getDefaultVisibilityChecker()));

        // How about writing null property values?
        JsonSerialize.Inclusion incl = ai.findSerializationInclusion(ac, null);
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.map.introspect.AnnotatedClass

                return name;
            }
        }
        BasicBeanDescription beanDesc = (BasicBeanDescription) config.introspectClassAnnotations(rootType);
        AnnotationIntrospector intr = config.getAnnotationIntrospector();
        AnnotatedClass ac = beanDesc.getClassInfo();
        String nameStr = intr.findRootName(ac);
        // No answer so far? Let's just default to using simple class name
        if (nameStr == null) {
            // Should we strip out enclosing class tho? For now, nope:
            nameStr = rootType.getSimpleName();
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.map.introspect.AnnotatedClass

        if (!addToCache) {
            // 14-Feb-2011, tatu: As per [JACKSON-487], try fully blocking annotation access:
            if (config.isEnabled(DeserializationConfig.Feature.USE_ANNOTATIONS)) {
                AnnotationIntrospector aintr = config.getAnnotationIntrospector();
                // note: pass 'null' to prevent mix-ins from being used
                AnnotatedClass ac = AnnotatedClass.construct(deser.getClass(), aintr, null);
                Boolean cacheAnn = aintr.findCachability(ac);
                if (cacheAnn != null) {
                    addToCache = cacheAnn.booleanValue();
                }
            }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.map.introspect.AnnotatedClass

        /* 10-Jul-2009, tatu: Should be able to just pass null as
         *    'MixInResolver'; no mix-ins set at this point
         */
        AnnotationIntrospector ai = getAnnotationIntrospector();
        AnnotatedClass ac = AnnotatedClass.construct(cls, ai, null);
        // visibility checks handled via separate checker object...
        VisibilityChecker<?> prevVc = getDefaultVisibilityChecker();
        _base = _base.withVisibilityChecker(ai.findAutoDetectVisibility(ac, prevVc));
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.introspect.AnnotatedClass

                return name;
            }
        }
        BeanDescription beanDesc = config.introspectClassAnnotations(rootType);
        AnnotationIntrospector intr = config.getAnnotationIntrospector();
        AnnotatedClass ac = beanDesc.getClassInfo();
        PropertyName pname = intr.findRootName(ac);
        String nameStr;
        // No answer so far? Let's just default to using simple class name
        if (pname == null || !pname.hasSimpleName()) {
            // Should we strip out enclosing class tho? For now, nope:
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.introspect.AnnotatedClass

        if (name != null) {
            return name;
        }
        BeanDescription beanDesc = config.introspectClassAnnotations(rootType);
        AnnotationIntrospector intr = config.getAnnotationIntrospector();
        AnnotatedClass ac = beanDesc.getClassInfo();
        name = intr.findRootName(ac);
        // No answer so far? Let's just default to using simple class name
        if (name == null || !name.hasSimpleName()) {
            // Should we strip out enclosing class tho? For now, nope:
            name = new PropertyName(rootType.getSimpleName());
View Full Code Here

Examples of com.fasterxml.jackson.databind.introspect.AnnotatedClass

    }

    public void testJsonTypeResolver() throws Exception
    {
        JacksonAnnotationIntrospector ai = new JacksonAnnotationIntrospector();
        AnnotatedClass ac = AnnotatedClass.constructWithoutSuperTypes(TypeResolverBean.class, ai, null);
        JavaType baseType = TypeFactory.defaultInstance().constructType(TypeResolverBean.class);
        ObjectMapper mapper = new ObjectMapper();
        TypeResolverBuilder<?> rb = ai.findTypeResolver(mapper.getDeserializationConfig(), ac, baseType);
        assertNotNull(rb);
        assertSame(DummyBuilder.class, rb.getClass());
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.