Ejemplo n.º 1
0
 public Object clone() throws CloneNotSupportedException {
   MethodSpecifier clone = (MethodSpecifier) super.clone();
   clone.setCaller((DataInputVariable) getCaller().clone());
   ValueSpecifier[] cloneParameters = new ValueSpecifier[parameters.length];
   for (int i = 0; i < parameters.length; i++) {
     cloneParameters[i] = (ValueSpecifier) parameters[i].clone();
   }
   clone.setParameters(cloneParameters);
   return clone;
 }
Ejemplo n.º 2
0
 /* Implementing ValueSpecifier */
 public ValueSpecifier cloneInContext(java.util.Map originalToCloneMap)
     throws CloneNotSupportedException {
   MethodSpecifier clone = (MethodSpecifier) super.clone();
   clone.setCaller((DataInputVariable) getCaller().cloneInContext(originalToCloneMap));
   ValueSpecifier[] cloneParameters = new ValueSpecifier[parameters.length];
   for (int i = 0; i < parameters.length; i++) {
     cloneParameters[i] = parameters[i].cloneInContext(originalToCloneMap);
   }
   clone.setParameters(cloneParameters);
   return clone;
 }
Ejemplo n.º 3
0
 public void executeEvent(MethodSpecifier eventMethodSpecifier, Scope scope) {
   Set<Method> beforeMethods = eventMethodSpecifier.getMethods(scope);
   for (Method beforeMethod : beforeMethods) {
     ReflectionUtil.invokeWithArgs(
         beforeMethod, addAndGetComponent(beforeMethod.getDeclaringClass()));
   }
 }