Top Inners Fields Constructors Methods
org.apache.logging.log4j.util

pack-priv final Class LazyUtil

extends Object
Class Inheritance
Imports
java.lang.ref.WeakReference, java.util.concurrent.locks.Lock, .ReentrantLock, java.util.function.Supplier

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final Object

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T> T
unwrapNull(final Object value)

pack-priv static Object
wrapNull(final Object value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NULLback to summary
private static final Object NULL

Constructor Detail

LazyUtilback to summary
pack-priv LazyUtil()

Method Detail

unwrapNullback to summary
pack-priv static <T> T unwrapNull(final Object value)
wrapNullback to summary
pack-priv static Object wrapNull(final Object value)
org.apache.logging.log4j.util back to summary

pack-priv Class LazyUtil.Constant<T>

extends Object
implements Lazy<T>
Class Inheritance
All Implemented Interfaces
org.apache.logging.log4j.util.Lazy, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private final T

Constructor Summary

AccessConstructor and Description
pack-priv
Constant(final T value)

Method Summary

Modifier and TypeMethod and Description
public boolean
isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

public void
set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public T
value()

Implements org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

valueback to summary
private final T value

Constructor Detail

Constantback to summary
pack-priv Constant(final T value)

Method Detail

isInitializedback to summary
public boolean isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Doc from org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

Annotations
@Override
setback to summary
public void set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Doc from org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
valueback to summary
public T value()

Implements org.apache.logging.log4j.util.Lazy.value.

Doc from org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already.

Annotations
@Override
org.apache.logging.log4j.util back to summary

pack-priv Class LazyUtil.PureLazy<T>

extends Object
implements Lazy<T>
Class Inheritance
All Implemented Interfaces
org.apache.logging.log4j.util.Lazy, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private final Supplier<T>
private Object

Constructor Summary

AccessConstructor and Description
public
PureLazy(final Supplier<T> supplier)

Method Summary

Modifier and TypeMethod and Description
public boolean
isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

public void
set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

public T
value()

Implements org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

supplierback to summary
private final Supplier<T> supplier
valueback to summary
private Object value

Constructor Detail

PureLazyback to summary
public PureLazy(final Supplier<T> supplier)

Method Detail

isInitializedback to summary
public boolean isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Doc from org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

Annotations
@Override
setback to summary
public void set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Doc from org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

Annotations
@Override
valueback to summary
public T value()

Implements org.apache.logging.log4j.util.Lazy.value.

Doc from org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already.

Annotations
@Override
org.apache.logging.log4j.util back to summary

pack-priv Class LazyUtil.SafeLazy<T>

extends Object
implements Lazy<T>
Class Inheritance
All Implemented Interfaces
org.apache.logging.log4j.util.Lazy, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private final Lock
private final Supplier<T>
private volatile Object

Constructor Summary

AccessConstructor and Description
pack-priv
SafeLazy(final Supplier<T> supplier)

Method Summary

Modifier and TypeMethod and Description
public boolean
isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

public void
public void
set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public T
value()

Implements org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

lockback to summary
private final Lock lock
supplierback to summary
private final Supplier<T> supplier
valueback to summary
private volatile Object value

Constructor Detail

SafeLazyback to summary
pack-priv SafeLazy(final Supplier<T> supplier)

Method Detail

isInitializedback to summary
public boolean isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Doc from org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

Annotations
@Override
resetback to summary
public void reset()
setback to summary
public void set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Doc from org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
valueback to summary
public T value()

Implements org.apache.logging.log4j.util.Lazy.value.

Doc from org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already.

Annotations
@Override
org.apache.logging.log4j.util back to summary

pack-priv Class LazyUtil.WeakConstant<T>

extends Object
implements Lazy<T>
Class Inheritance
All Implemented Interfaces
org.apache.logging.log4j.util.Lazy, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private final WeakReference<T>

Constructor Summary

AccessConstructor and Description
pack-priv
WeakConstant(final T value)

Method Summary

Modifier and TypeMethod and Description
public boolean
isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

public void
set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public T
value()

Implements org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

referenceback to summary
private final WeakReference<T> reference

Constructor Detail

WeakConstantback to summary
pack-priv WeakConstant(final T value)

Method Detail

isInitializedback to summary
public boolean isInitialized()

Implements org.apache.logging.log4j.util.Lazy.isInitialized.

Doc from org.apache.logging.log4j.util.Lazy.isInitialized.

Indicates whether this lazy value has been initialized.

Annotations
@Override
setback to summary
public void set(final T newValue)

Implements org.apache.logging.log4j.util.Lazy.set.

Doc from org.apache.logging.log4j.util.Lazy.set.

Sets this lazy value to the provided value.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
valueback to summary
public T value()

Implements org.apache.logging.log4j.util.Lazy.value.

Doc from org.apache.logging.log4j.util.Lazy.value.

Returns the value held by this lazy. This may cause the value to initialize if it hasn't been already.

Annotations
@Override