/** * {@inheritDoc} */ public SetTopRule get() { return new SetTopRule(this.methodName, this.paramType); }
@Override public Object createObject(Attributes attributes) { String methodName = attributes.getValue("methodname"); String paramType = attributes.getValue("paramtype"); return (paramType == null || paramType.length() == 0) ? new SetTopRule( methodName) : new SetTopRule( methodName, paramType); } }
/** * Add a "set top" rule for the specified parameters. * * @param pattern Element matching pattern * @param methodName Method name to call on the parent element * @see SetTopRule */ public void addSetTop(String pattern, String methodName) { addRule(pattern, new SetTopRule(methodName)); }
/** * Add a "set top" rule for the specified parameters. * * @param pattern Element matching pattern * @param methodName Method name to call on the parent element * @param paramType Java class name of the expected parameter type * (if you wish to use a primitive type, specify the corresonding * Java wrapper class instead, such as <code>java.lang.Boolean</code> * for a <code>boolean</code> parameter) * @see SetTopRule */ public void addSetTop(String pattern, String methodName, String paramType) { addRule(pattern, new SetTopRule(methodName, paramType)); }
public Object createObject(Attributes attributes) { String methodName = attributes.getValue("methodname"); String paramType = attributes.getValue("paramtype"); return (paramType == null || paramType.length() == 0) ? new SetTopRule( methodName) : new SetTopRule( methodName, paramType); } }
/** * Add a "set top" rule for the specified parameters. * * @param pattern Element matching pattern * @param methodName Method name to call on the parent element * @see SetTopRule */ public void addSetTop(String pattern, String methodName) { addRule(pattern, new SetTopRule(methodName)); }
/** * Add a "set top" rule for the specified parameters. * * @param pattern Element matching pattern * @param methodName Method name to call on the parent element * @param paramType Java class name of the expected parameter type * (if you wish to use a primitive type, specify the corresonding * Java wrapper class instead, such as <code>java.lang.Boolean</code> * for a <code>boolean</code> parameter) * @see SetTopRule */ public void addSetTop(String pattern, String methodName, String paramType) { addRule(pattern, new SetTopRule(methodName, paramType)); }