According to the book "Effective java", which makes the statement "Class object returned by the static method factory, there is not even time at which the class containing the method is written." means the following paragraph:
A good way to explain what is meant by this sentence is to look at the type EnumSetthat is the class in the package java.util.
EnumSetis an abstract class without any constructors available. To get an instance EnumSet, the programmer uses one of his static factory methods, for example. EnumSet.of( ... ). For instance:
Set<MyEnum> s = EnumSet.of(MyEnum.FIRST_CONSTANT);
, of(), EnumSet. , MyEnum. MyEnum 64 , , of(), RegularEnumSet. MyClass 64 , JumboEnumSet. . , , - , EnumSet.
, Java , EnumSet, , , ( 1024). , EnumSet :
final CachedEnumSet extends EnumSet {
:
:
}
, CachedEnumSet EnumSet, , , Java .
, EnumSet.of(), RegularEnumSet, JumboEnumSet CachedEnumSet, , , , EnumSet .