Package lombok

Examples of lombok.val.toArray()


  {
    val result = new ReifiedArrayList<T>(componentType);
    while (enumeration.hasMoreElements())
      result.add(enumeration.nextElement());

    return result.toArray();
  }

  /**
   * Converts a list to an array.
   *
 
View Full Code Here


    val result = new ReifiedArrayList<Pair<TResult1, TResult2>>(DEFAULT_LIST_SIZE, Pair.class);

    for (T item : values)
      result.add(func.apply(item));

    return result.toArray();
  }

  /**
   * Returns a subset of the provided sequence, which conforms to the given predicate i.e. acts like a Where LINQ function It will never
   * return null.
View Full Code Here

    // exclude the specified one
    for (val iface : type.getInterfaces())
      if (!iface.equals(excludedInterface))
        interfaces.add(iface);

    return interfaces.toArray();
  }

  /**
   * Gets all constructors found in a type. Optionally returns superclass constructors too, rather than just declared ones.
   *
 
View Full Code Here

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

    return result.toArray();
  }

  /**
   * Returns null if a type has no default no-argument constructor, otherwise returns the constructor.
   *
 
View Full Code Here

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

    return result.toArray();
  }

  /**
   * Returns all fields found in a class type matching the given name. Optionally returns inherited ones too, rather than just declared
   * ones.
 
View Full Code Here

      while ((superClass = superClass.getSuperclass()) != null)
        for (Method method : superClass.getDeclaredMethods())
          result.add(method);
    }

    return result.toArray();
  }

  /**
   * Returns all methods found in a class type matching the given name. Optionally returns inherited ones too, rather than just declared
   * ones.
 
View Full Code Here

    // 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
  private static MemberInfo constructorToMemberInfo(final Constructor<?> arg)
  {
View Full Code Here

    // exclude the specified one
    for (val iface : type.getInterfaces())
      if (!iface.equals(excludedInterface))
        interfaces.add(iface);

    return interfaces.toArray();
  }

  /**
   * Gets all constructors found in a type. Optionally returns superclass constructors too, rather than just declared ones.
   *
 
View Full Code Here

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

    return result.toArray();
  }

  /**
   * Returns null if a type has no default no-argument constructor, otherwise returns the constructor.
   *
 
View Full Code Here

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

    return result.toArray();
  }

  /**
   * Returns all fields found in a class type matching the given name. Optionally returns inherited ones too, rather than just declared
   * ones.
 
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.