Package lombok

Examples of lombok.val.addAll()


        // get super class annotations
        result.addAll(ArrayUtils.toList(superClass.getDeclaredAnnotations()));

      // now get all the superinterfaces' annotations
      for (val iface : annotatedClass.getInterfaces())
        result.addAll(ArrayUtils.toList(iface.getDeclaredAnnotations()));
    }

    return result;
  }
View Full Code Here


  public static List<Annotation> getMethodAnnotations(@NotNull final Method annotatedMethod, boolean includeInherited)
  {
    val result = new ArrayList<Annotation>(16);

    // get method annotations
    result.addAll(ArrayUtils.toList(annotatedMethod.getDeclaredAnnotations()));

    if (includeInherited)
    {
      // get all annotations from base classes and implemented interfaces
      Class<?> superClass = annotatedMethod.getDeclaringClass();
View Full Code Here

      while ((superClass = superClass.getSuperclass()) != null)
      {
        // get super class method annotations
        Method superClassMethod = findDeclaredMethod(superClass, annotatedMethod);
        if (superClassMethod != null)
          result.addAll(ArrayUtils.toList(superClassMethod.getDeclaredAnnotations()));
      }

      // now get all the super-interfaces' annotations
      for (val iface : annotatedMethod.getDeclaringClass().getInterfaces())
      {
View Full Code Here

  {
    val result = new ArrayList<T>(16);

    // get method annotations
    List<Annotation> annotations = ArrayUtils.toList(annotatedMethod.getDeclaredAnnotations());
    result.addAll(Linq.toList(Linq.ofType(annotations, annotationType)));

    if (includeInherited)
    {
      // get all annotations from base classes and implemented interfaces
      Class<?> superClass = annotatedMethod.getDeclaringClass();
View Full Code Here

    if (includeSuperClass)
    {
      Class<?> superClass = type;
      while ((superClass = superClass.getSuperclass()) != null)
        result.addAll(Arrays.asList(superClass.getDeclaredConstructors()));
    }

    return result.toArray();
  }
View Full Code Here

    if (includeInherited)
    {
      Class<?> superClass = type;
      while ((superClass = superClass.getSuperclass()) != null)
        result.addAll(Arrays.asList(superClass.getDeclaredFields()));
    }

    return result.toArray();
  }
View Full Code Here

  public static MemberInfo[] getMembers(@NotNull final Class<?> type, boolean includeInherited)
  {
    val result = new ReifiedArrayList<MemberInfo>(MemberInfo.class);

    // get fields
    result.addAll(Arrays.asList(Linq.select(getFields(type, includeInherited), fieldToMemberInfo())));
    // get methods
    result.addAll(Arrays.asList(Linq.select(getMethods(type, includeInherited), methodToMemberInfo())));
    // get properties
    result.addAll(Arrays.asList(Linq.select(getProperties(type, includeInherited), propertyToMemberInfo())));
    // get constructors
View Full Code Here

    val result = new ReifiedArrayList<MemberInfo>(MemberInfo.class);

    // get fields
    result.addAll(Arrays.asList(Linq.select(getFields(type, includeInherited), fieldToMemberInfo())));
    // get methods
    result.addAll(Arrays.asList(Linq.select(getMethods(type, includeInherited), methodToMemberInfo())));
    // get properties
    result.addAll(Arrays.asList(Linq.select(getProperties(type, includeInherited), propertyToMemberInfo())));
    // get constructors
    result.addAll(Arrays.asList(Linq.select(getConstructors(type, includeInherited), constructorToMemberInfo())));
View Full Code Here

    // get fields
    result.addAll(Arrays.asList(Linq.select(getFields(type, includeInherited), fieldToMemberInfo())));
    // get methods
    result.addAll(Arrays.asList(Linq.select(getMethods(type, includeInherited), methodToMemberInfo())));
    // get properties
    result.addAll(Arrays.asList(Linq.select(getProperties(type, includeInherited), propertyToMemberInfo())));
    // get constructors
    result.addAll(Arrays.asList(Linq.select(getConstructors(type, includeInherited), constructorToMemberInfo())));

    return result.toArray();
  }
View Full Code Here

    // get methods
    result.addAll(Arrays.asList(Linq.select(getMethods(type, includeInherited), methodToMemberInfo())));
    // get properties
    result.addAll(Arrays.asList(Linq.select(getProperties(type, includeInherited), propertyToMemberInfo())));
    // get constructors
    result.addAll(Arrays.asList(Linq.select(getConstructors(type, includeInherited), constructorToMemberInfo())));

    return result.toArray();
  }

  @Function
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.