Top Description Fields Constructors Methods
org.easymock.internal

public Class Injection

extends Object
Class Inheritance
Imports
org.easymock.Mock

Described mock instance for injection.
Author
Alistair Todd
Since
3.3

Field Summary

Modifier and TypeField and Description
private final Mock
private boolean
private final Object

Constructor Summary

AccessConstructor and Description
public
Injection(Object
a mock object instance
mock
,
Mock
Mock annotation describing the mock
annotation
)

Create instance containing the given mock and annotation.

Method Summary

Modifier and TypeMethod and Description
public Mock

Returns:

annotation describing the mock instance
getAnnotation
()

Gets the annotation describing this mock instance.

public Object

Returns:

a mock object instance
getMock
()

Gets the mock instance for this injection.

public String

Returns:

the field name qualifier for this injection which may be empty string where not set.
getQualifier
()

Get the field name qualifier for this injection.

public boolean

Returns:

true if setMatched was called, indicating that a matching injection target was found
isMatched
()

Is this injection matched by some injection target?

public void
setMatched()

Change the status to indicate that this injection was matched to some target.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationback to summary
private final Mock annotation
matchedback to summary
private boolean matched
mockback to summary
private final Object mock

Constructor Detail

Injectionback to summary
public Injection(Object mock, Mock annotation)

Create instance containing the given mock and annotation.

Parameters
mock:Object

a mock object instance

annotation:Mock

Mock annotation describing the mock

Method Detail

getAnnotationback to summary
public Mock getAnnotation()

Gets the annotation describing this mock instance.

Returns:Mock

annotation describing the mock instance

getMockback to summary
public Object getMock()

Gets the mock instance for this injection.

Returns:Object

a mock object instance

getQualifierback to summary
public String getQualifier()

Get the field name qualifier for this injection.

Returns:String

the field name qualifier for this injection which may be empty string where not set.

isMatchedback to summary
public boolean isMatched()

Is this injection matched by some injection target?

Returns:boolean

true if setMatched was called, indicating that a matching injection target was found

setMatchedback to summary
public void setMatched()

Change the status to indicate that this injection was matched to some target.