How does the dom4j library implement the Flyweight template?

I can see in the dom4j library several classes with the Flyweight prefix: FlyweightAttribute, FlyweightComment, FlyweightText, etc. Here's what the Java document says in the case of FlyweightText:

FlyweightText is an implementation of the Flyweight template for a single-read, read-only XML text. This node can be shared between documents and elements, although it does not support parenting.

However, I can not find in the pool of code instances and where these instances are shared between documents.

Is this function implemented at all in the library? If so, where is the code that implements it?

+3
source share
1

1.6.1. , Flyweight - . , GoF ( , - ).

(jstrachan@apache.org), ?

0

Source: https://habr.com/ru/post/1769768/


All Articles