final class MethodSpec implements MethodSpecInterface

internal  This class is not covered by the backward compatibility promise
 

Specifies requirements on method including its name and modifiers.

Constants

IS_STATIC

IS_PUBLIC

IS_PROTECTED

IS_PRIVATE

IS_ABSTRACT

IS_FINAL

ACCESS_MASK

NOT_PUBLIC

NOT_PROTECTED

NOT_PRIVATE

ACCESS_MAP

Methods

__construct(string $name, bool|null $static = null, int|null $access = null, bool|null $abstract = null, bool|null $final = null)

No description

string
getName()

{@inheridoc}.

bool|null
getStatic()

{@inheridoc}.

int|null
getAccess()

{@inheridoc}.

bool|null
getAbstract()

{@inheridoc}.

bool|null
getFinal()

{@inheridoc}.

bool
matches(ReflectionMethod $method)

{@inheridoc}.

string
toString()

{@inheridoc}.

Details

at line 98
__construct(string $name, bool|null $static = null, int|null $access = null, bool|null $abstract = null, bool|null $final = null)

No description

Parameters

string $name
bool|null $static
int|null $access
bool|null $abstract
bool|null $final

at line 115
string getName()

{@inheridoc}.

Return Value

string

at line 123
bool|null getStatic()

{@inheridoc}.

Return Value

bool|null

true to match only static methods, false for non-static, null for any

at line 131
int|null getAccess()

{@inheridoc}.

Return Value

int|null

a bit combination of \ReflectionMethod::IS_PUBLIC, \ReflectionMethod::IS_PROTECTED and \ReflectionMethod::IS_PRIVATE specifying which of these visibility modifiers match the specification, or null if anything is accepted

at line 139
bool|null getAbstract()

{@inheridoc}.

Return Value

bool|null

true to match only abstract methods, false for non-abstract, null for any

at line 147
bool|null getFinal()

{@inheridoc}.

Return Value

bool|null

true to match only final methods, false for non-final, null for any

at line 155
bool matches(ReflectionMethod $method)

{@inheridoc}.

Parameters

ReflectionMethod $method

Return Value

bool

at line 167
string toString()

{@inheridoc}.

Return Value

string