| 1 |
package org.jboss.resteasy.spi.metadata; |
| 2 |
|
| 3 |
import java.lang.annotation.Annotation; |
| 4 |
import java.lang.reflect.AccessibleObject; |
| 5 |
import java.lang.reflect.Method; |
| 6 |
import java.lang.reflect.Type; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
public class SetterParameter extends Parameter |
| 13 |
{ |
| 14 |
protected Method setter; |
| 15 |
protected Method annotatedMethod; |
| 16 |
|
| 17 |
protected SetterParameter(ResourceClass declaredClass, Method setter, Method annotatedMethod) |
| 18 |
{ |
| 19 |
super(declaredClass, setter.getParameterTypes()[0], setter.getGenericParameterTypes()[0]); |
| 20 |
this.setter = setter; |
| 21 |
this.annotatedMethod = annotatedMethod; |
| 22 |
} |
| 23 |
|
| 24 |
public Method getSetter() |
| 25 |
{ |
| 26 |
return setter; |
| 27 |
} |
| 28 |
|
| 29 |
public Method getAnnotatedMethod() |
| 30 |
{ |
| 31 |
return annotatedMethod; |
| 32 |
} |
| 33 |
|
| 34 |
@Override |
| 35 |
public AccessibleObject getAccessibleObject() |
| 36 |
{ |
| 37 |
return setter; |
| 38 |
} |
| 39 |
|
| 40 |
@Override |
| 41 |
public Annotation[] getAnnotations() |
| 42 |
{ |
| 43 |
return annotatedMethod.getAnnotations(); |
| 44 |
} |
| 45 |
|
| 46 |
} |