Home / Function/ add() — netty Function Reference

add() — netty Function Reference

Architecture documentation for the add() function in CodecOutputList.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c2d77e60_10a0_d3f8_12aa_831ad0030005["add()"]
  6ac16422_9a27_c4b7_2cbb_da7b639a19f5["CodecOutputList"]
  c2d77e60_10a0_d3f8_12aa_831ad0030005 -->|defined in| 6ac16422_9a27_c4b7_2cbb_da7b639a19f5
  e69df763_3aef_2f09_e4d5_2bed76d725fc["insert()"]
  c2d77e60_10a0_d3f8_12aa_831ad0030005 -->|calls| e69df763_3aef_2f09_e4d5_2bed76d725fc
  cc7605e3_5eb4_3474_a434_165576d90234["expandArray()"]
  c2d77e60_10a0_d3f8_12aa_831ad0030005 -->|calls| cc7605e3_5eb4_3474_a434_165576d90234
  4e5d9039_6b7f_1bb0_324e_e9da116b7ae7["checkIndex()"]
  c2d77e60_10a0_d3f8_12aa_831ad0030005 -->|calls| 4e5d9039_6b7f_1bb0_324e_e9da116b7ae7
  style c2d77e60_10a0_d3f8_12aa_831ad0030005 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/main/java/io/netty/handler/codec/CodecOutputList.java lines 119–131

    @Override
    public boolean add(Object element) {
        checkNotNull(element, "element");
        try {
            insert(size, element);
        } catch (IndexOutOfBoundsException ignore) {
            // This should happen very infrequently so we just catch the exception and try again.
            expandArray();
            insert(size, element);
        }
        ++ size;
        return true;
    }

Domain

Subdomains

Frequently Asked Questions

What does add() do?
add() is a function in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/CodecOutputList.java.
Where is add() defined?
add() is defined in codec-base/src/main/java/io/netty/handler/codec/CodecOutputList.java at line 119.
What does add() call?
add() calls 3 function(s): checkIndex, expandArray, insert.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free