Methods Summary |
---|
public boolean | equals(java.lang.Object o)
if (!(o instanceof InjectionTarget)) {
return false;
} else {
InjectionTarget injTarget = (InjectionTarget)o;
return equals(className, injTarget.className) &&
equals(targetName, injTarget.targetName) &&
equals(fieldName, injTarget.fieldName) &&
equals(methodName, injTarget.methodName);
}
|
private boolean | equals(java.lang.String s1, java.lang.String s2)
return (s1 != null && s1.equals(s2) || s1 == null && s2 == null);
|
public java.lang.String | getClassName()
return className;
|
public java.lang.reflect.Field | getField()
return field;
|
public java.lang.String | getFieldName()
return fieldName;
|
public java.lang.reflect.Method | getMethod()
return method;
|
public java.lang.String | getMethodName()Inject method name is the actual java method name of the setter method,
not the bean property name. E.g., for @Resource void setFoo(Bar b)
it would be "setFoo", not the property name "foo".
return methodName;
|
public java.lang.String | getTargetName()This is the form used by the .xml injection-group elements to
represent the target of injection. It either represents the
javabeans property name of the injection method or the name
of the injected field. This value is set on the descriptor
during .xml processing and converted into the appropriate
field/method name during validation.
return targetName;
|
public int | hashCode()
int result = 17;
result = 37*result + (className == null ? 0 : className.hashCode());
result = 37*result + (targetName == null ? 0: targetName.hashCode());
result = 37*result + (fieldName == null ? 0: fieldName.hashCode());
result = 37*result + (methodName == null ? 0: methodName.hashCode());
return result;
|
public boolean | isFieldInjectable()
return fieldName!=null;
|
public boolean | isMethodInjectable()
return methodName!=null;
|
public void | setClassName(java.lang.String className)
this.className = className;
|
public void | setField(java.lang.reflect.Field field)
this.field = field;
|
public void | setFieldName(java.lang.String fieldName)
this.fieldName = fieldName;
this.targetName = fieldName;
|
public void | setMethod(java.lang.reflect.Method method)
this.method = method;
|
public void | setMethodName(java.lang.String methodName)
this.methodName = methodName;
// Method name follows java beans setter syntax
this.targetName = TypeUtil.setterMethodToPropertyName(methodName);
;
|
public void | setTargetName(java.lang.String targetName)
this.targetName = targetName;
|