Top Description Inners Fields Constructors Methods
org.easymock.bytebuddy.utility

public Class QueueFactory

extends Object
Class Inheritance
Annotations
@Enhance
Imports
org.easymock.bytebuddy.build.AccessControllerPlugin, .HashCodeAndEqualsPlugin, org.easymock.bytebuddy.utility.dispatcher.JavaDispatcher, org.easymock.bytebuddy.utility.nullability.MaybeNull, java.security.PrivilegedAction, java.util.Collection, .LinkedList, .Queue

A factory for creating a Queue. For Java 5, a LinkedList is created whereas a java.util.ArrayDeque is used for any future JVM version.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static interface
QueueFactory.Dispatcher

A dispatcher for creating an java.util.ArrayDeque.

Field Summary

Modifier and TypeField and Description
private final QueueFactory.Dispatcher
dispatcher

The dispatcher to use.

private static final QueueFactory
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private
QueueFactory()

Creates a new queue factory.

Method Summary

Modifier and TypeMethod and Description
private static <
The type of the action's resolved value.
T
>
T

Returns:

The action's resolved value.
doPrivileged
(PrivilegedAction<T>
The action to execute from a privileged context.
action
)

A proxy for java.security.AccessController#doPrivileged that is activated if available.

public static <
The type of the queue elements.
T
>
Queue<T>

Returns:

An appropriate queue.
make
()

Creates a new queue.

public static <
The type of the queue elements.
T
>
Queue<T>

Returns:

An appropriate queue.
make
(Collection<? extends T>
The elements to provide to the queue constructor.
elements
)

Creates a new queue.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dispatcherback to summary
private final QueueFactory.Dispatcher dispatcher

The dispatcher to use.

INSTANCEback to summary
private static final QueueFactory INSTANCE

The singleton instance.

Constructor Detail

QueueFactoryback to summary
private QueueFactory()

Creates a new queue factory.

Method Detail

doPrivilegedback to summary
private static <T> T doPrivileged(PrivilegedAction<T> action)

A proxy for java.security.AccessController#doPrivileged that is activated if available.

Parameters
<T>
The type of the action's resolved value.
action:PrivilegedAction<T>

The action to execute from a privileged context.

Returns:T

The action's resolved value.

Annotations
@Enhance
makeback to summary
public static <T> Queue<T> make()

Creates a new queue.

Parameters
<T>
The type of the queue elements.
Returns:Queue<T>

An appropriate queue.

makeback to summary
public static <T> Queue<T> make(Collection<? extends T> elements)

Creates a new queue.

Parameters
<T>
The type of the queue elements.
elements:Collection<? extends T>

The elements to provide to the queue constructor.

Returns:Queue<T>

An appropriate queue.

org.easymock.bytebuddy.utility back to summary

protected Interface QueueFactory.Dispatcher

Annotations
@Defaults
@Proxied:ArrayDeque

A dispatcher for creating an java.util.ArrayDeque.

Method Summary

Modifier and TypeMethod and Description
public <
The type of the action's resolved value.
T
>
Queue<T>

Returns:

An array deque or null if this class is not supplied by the current VM.
arrayDeque
()

Creates a new array deque.

public <
The type of the action's resolved value.
T
>
Queue<T>

Returns:

An array deque or null if this class is not supplied by the current VM.
arrayDeque
(Collection<? extends T>
The elements to provide to the queue constructor.
elements
)

Creates a new array deque.

Method Detail

arrayDequeback to summary
public <T> Queue<T> arrayDeque()

Creates a new array deque.

Parameters
<T>
The type of the action's resolved value.
Returns:Queue<T>

An array deque or null if this class is not supplied by the current VM.

Annotations
@MaybeNull
@IsConstructor
arrayDequeback to summary
public <T> Queue<T> arrayDeque(Collection<? extends T> elements)

Creates a new array deque.

Parameters
<T>
The type of the action's resolved value.
elements:Collection<? extends T>

The elements to provide to the queue constructor.

Returns:Queue<T>

An array deque or null if this class is not supplied by the current VM.

Annotations
@MaybeNull
@IsConstructor