Class Container<T extends Indenter, M extends MemberData<?>>

java.lang.Object
org.openjdk.asmtools.jdis.Indenter
org.openjdk.asmtools.jdis.Container<T,M>
All Implemented Interfaces:
Iterable<T>, Measurable, Printable
Direct Known Subclasses:
StackMapTable

public class Container<T extends Indenter, M extends MemberData<?>> extends Indenter implements Iterable<T>, Measurable
  • Field Details

  • Constructor Details

    • Container

      public Container(M owner, Class<T> elementClass, int initialCapacity)
  • Method Details

    • isCollectionMeasurable

      protected final boolean isCollectionMeasurable()
    • print

      public void print() throws IOException
      Description copied from class: Indenter
      If a table format is supported and the tool option TABLE is set, prints an object as a table entry.
      Specified by:
      print in interface Printable
      Overrides:
      print in class Indenter
      Throws:
      IOException
    • add

      public void add(T element) throws IOException
      Throws:
      IOException
    • size

      public int size()
    • get

      public T get(int index)
    • isPrintable

      public boolean isPrintable()
      Specified by:
      isPrintable in interface Printable
    • getPrintSize

      public int getPrintSize()
      Calculates max print size of elements in a collection if they are measurable In the case of s collection the print size is equal to max print size
      Specified by:
      getPrintSize in interface Measurable
      Returns:
      maxSize or 0
    • setMaxPrintSize

      public void setMaxPrintSize(int maxSize)
      Sets max print size to all elements of the collection
      Specified by:
      setMaxPrintSize in interface Measurable
    • getMaxPrintSize

      public int getMaxPrintSize()
      Calculates max print size of elements in a collection if they are measurable In the case of s collection the print size is equal to max print size
      Specified by:
      getMaxPrintSize in interface Measurable
      Returns:
      maxSize or 0
    • setPrintable

      public Container<T,M> setPrintable(boolean value)
      Set up print-ability of cartage
      Parameters:
      value - print-ability
      Returns:
      the instance
    • setHasSize

      public Container<T,M> setHasSize(boolean value)
      Set up measure-ability of cartage
      Overrides:
      setHasSize in class Indenter
      Parameters:
      value - can be measured
      Returns:
      the instance
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends Indenter>
    • forEach

      public void forEach(Consumer<? super T> action)
      Specified by:
      forEach in interface Iterable<T extends Indenter>
    • spliterator

      public Spliterator<T> spliterator()
      Specified by:
      spliterator in interface Iterable<T extends Indenter>