public class DefaultMethodResolver extends Object implements IMethodResolver
Method
s.Constructor and Description |
---|
DefaultMethodResolver() |
Modifier and Type | Method and Description |
---|---|
Serializable |
getId(Method method)
Generates an identifier for the given method consisting of the method
name and the first character of each parameter type.
|
Method |
getMethod(Class<?> owner,
Serializable id)
Inverse operation of
getId(Method) . |
Method |
getSetter(Method getter)
Resolves the setter by Java Beans convention.
|
public Method getMethod(Class<?> owner, Serializable id)
getId(Method)
.getMethod
in interface IMethodResolver
owner
- the owning classid
- method identifierpublic Serializable getId(Method method)
Java Bean getters are abbreviated to the name of the property.
getId
in interface IMethodResolver
method
- methodpublic Method getSetter(Method getter)
Setters are allowed to have arbitrary parameters, given that they match the arguments of the getter plus one additional argument matching the getter's return type.
getSetter
in interface IMethodResolver
Copyright © 2015. All rights reserved.