Package com.linkedin.restli.restspec

Examples of com.linkedin.restli.restspec.RestSpecAnnotation


  private static AnnotationTrait getTraits(Class<? extends Annotation> clazz, boolean isTopLevel)
  {
    final AnnotationTrait trait = new AnnotationTrait();

    final RestSpecAnnotation classAnnotation = clazz.getAnnotation(RestSpecAnnotation.class);
    if (classAnnotation == null)
    {
      trait.masterTrait = new MetaTrait(false,
                                        clazz.getCanonicalName(),
                                        isTopLevel,
                                        RestSpecAnnotation.DEFAULT_SKIP_DEFAULT);
    }
    else
    {
      trait.masterTrait = new MetaTrait(classAnnotation, clazz.getCanonicalName());
    }

    trait.memberTraits = new HashMap<Method, MetaTrait>();
    for (Method m: clazz.getDeclaredMethods())
    {
      final RestSpecAnnotation methodAnnotation = m.getAnnotation(RestSpecAnnotation.class);
      if (methodAnnotation == null && !trait.masterTrait.exclude)
      {
        trait.memberTraits.put(m, new MetaTrait(trait.masterTrait.isRestSpecAnnotated,
                                                m.getName(),
                                                trait.masterTrait.exclude,
                                                trait.masterTrait.skipDefault));
      }
      else if (methodAnnotation != null && !methodAnnotation.exclude())
      {
        trait.memberTraits.put(m, new MetaTrait(methodAnnotation, m.getName()));
      }
    }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.restspec.RestSpecAnnotation

Copyright © 2018 www.massapicom. 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.