Class DefaultClassList

java.lang.Object
org.apache.juneau.cp.DefaultClassList

public class DefaultClassList extends Object
A list of default implementation classes.
Notes:
  • This class is not thread safe.
See Also:
  • Constructor Details

  • Method Details

    • create

      public static DefaultClassList create()
      Static creator.
      Returns:
      A new object.
    • of

      public static DefaultClassList of(Class<?>... values)
      Static creator.
      Parameters:
      values - Initial entries in this list.
      Returns:
      A new object initialized with the specified values.
    • add

      public DefaultClassList add(Class<?>... values)
      Prepends the specified values to the beginning of this list.
      Parameters:
      values - The values to prepend to this list.
      Returns:
      This object.
    • get

      public <T> Optional<Class<? extends T>> get(Class<T> type)
      Returns the first class in this list which is a subclass of (or same as) the specified type.
      Type Parameters:
      T - The parent type.
      Parameters:
      type - The parent type to check for.
      Returns:
      The first class in this list which is a subclass of the specified type.
    • copy

      Creates a copy of this list.
      Returns:
      A copy of this list.