Module org.htmlunit.corejs
Package org.htmlunit.corejs.javascript
Class LazilyLoadedCtor<T extends PropHolder<T>>
java.lang.Object
org.htmlunit.corejs.javascript.LazilyLoadedCtor<T>
- All Implemented Interfaces:
Serializable
Avoid loading classes unless they are used.
This improves startup time and average memory usage.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, boolean sealed, boolean privileged, Initializable initializer) Create a constructor using a lambda function.LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, boolean sealed, Initializable initializer, boolean privileged) Create a constructor using a lambda function.LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, String className, boolean sealed) Create a constructor that loads via reflection, looking for an "init" method on the class.LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, String className, boolean sealed, boolean privileged) Create a constructor that loads via reflection, looking for an "init" method on the class. -
Method Summary
-
Constructor Details
-
LazilyLoadedCtor
public LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, boolean sealed, boolean privileged, Initializable initializer) Create a constructor using a lambda function. The lambda should initialize the new value however it needs and then return the value. The lambda may also return null, which indicates that it stored the necessary property (and possibly other properties) in the scope itself. This is legacy behavior used by some initializers that register many objects in a single initialization function. -
LazilyLoadedCtor
public LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, boolean sealed, Initializable initializer, boolean privileged) Create a constructor using a lambda function. The lambda should initialize the new value however it needs and then return the value. The lambda may also return null, which indicates that it stored the necessary property (and possibly other properties) in the scope itself. This is legacy behavior used by some initializers that register many objects in a single initialization function. -
LazilyLoadedCtor
public LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, String className, boolean sealed) Create a constructor that loads via reflection, looking for an "init" method on the class. This is a legacy mechanism. -
LazilyLoadedCtor
public LazilyLoadedCtor(SlotMapOwner<T> scope, String propertyName, String className, boolean sealed, boolean privileged) Create a constructor that loads via reflection, looking for an "init" method on the class. This is a legacy mechanism.
-