MethodActionpublic class MethodAction extends com.sun.jdo.api.persistence.enhancer.util.Support MethodAction controls the annotation actions applied to a single
method of a class. |
Fields Summary |
---|
private final ClassAction | ca | private final ClassMethod | theMethod | private final MethodAnnotater | annotater | private final Environment | env |
Constructors Summary |
---|
MethodAction(ClassAction ca, ClassMethod method, Environment env)Constructor
this.ca = ca;
theMethod = method;
this.env = env;
annotater = new MethodAnnotater(ca, method, env);
|
Methods Summary |
---|
void | annotate()Perform annotations
annotater.annotateMethod();
| void | check()Examine the method to determine what actions are required
annotater.checkMethod();
//@olsen: disabled feature
/*
if (env.verbose()) {
CodeAttribute codeAttr = theMethod.codeAttribute();
if (codeAttr != null) {
Enumeration e = codeAttr.attributes().elements();
while (e.hasMoreElements()) {
ClassAttribute attr = (ClassAttribute) e.nextElement();
if ((attr instanceof GenericAttribute) &&
safeGenericAttributes.contains(attr.attrName().asString())) {
String userClass = ca.classControl().userClassName();
String msg = "method " + userClass +
"." + theMethod.name().asString() +
Descriptor.userMethodArgs(theMethod.signature().asString()) +
" contains an unrecognized attribute of type " +
attr.attrName().asString() + ". " +
"Please check with Object Design support to see " +
"whether this is a problem.";
env.warning(msg, userClass);
}
}
}
}
*/
| ClassMethod | method()Returns the method for which this MethodAction applies
return theMethod;
| boolean | needsAnnotation()Returns true if any code annotations need to be performed on
this method.
return annotater.needsAnnotation();
|
|