public abstract class MethodOverride extends java.lang.Object implements BeanMetadataElement
Note that the override mechanism is not intended as a generic means of inserting crosscutting code: use AOP for that.
Modifier | Constructor and Description |
---|---|
protected |
MethodOverride(java.lang.String methodName)
Construct a new override for the given method.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getMethodName()
Return the name of the method to be overridden.
|
java.lang.Object |
getSource()
Return the configuration source
Object for this metadata element
(may be null ). |
int |
hashCode() |
protected boolean |
isOverloaded()
Return whether the overridden method is overloaded (i.e., whether argument
type matching needs to occur to disambiguate methods of the same name).
|
abstract boolean |
matches(java.lang.reflect.Method method)
Subclasses must override this to indicate whether they match the
given method.
|
protected void |
setOverloaded(boolean overloaded)
Set whether the overridden method is overloaded (i.e., whether argument
type matching needs to occur to disambiguate methods of the same name).
|
void |
setSource(java.lang.Object source)
Set the configuration source
Object for this metadata element. |
protected MethodOverride(java.lang.String methodName)
methodName
- the name of the method to overridepublic java.lang.String getMethodName()
protected void setOverloaded(boolean overloaded)
Default is true
; can be switched to false
to optimize
runtime performance.
protected boolean isOverloaded()
public void setSource(@Nullable java.lang.Object source)
Object
for this metadata element.
The exact type of the object will depend on the configuration mechanism used.
@Nullable public java.lang.Object getSource()
BeanMetadataElement
Object
for this metadata element
(may be null
).getSource
in interface BeanMetadataElement
public abstract boolean matches(java.lang.reflect.Method method)
method
- the method to checkpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object