📄 jacsontaskparam.java
字号:
package de.spieleck.app.jacson.ant;
import org.apache.tools.ant.BuildException;
/**
* Another name/value pair encapsulation.
*
* <p>
* This time for the JacsonTask parameters.
* </p>
* XXX Make the JacsonSource configurable, currently it is LineChunkSource.
* @author fsn
*
*/
public class JacsonTaskParam
{
/** The parameter name */
private String name = null;
/** The parameter's value */
private String value = null;
/**
* Set the parameter name.
*
* @param name the name of the parameter.
*/
public void setName(String name){
this.name = name;
}
/**
* The value for the parameter
*
* @param value the value representing the
* parameter's value.
*/
public void setValue(String value){
this.value = value;
}
/**
* Get the parameter name
*
* @return the parameter name
* @exception BuildException if the name is not set.
*/
public String getName() throws BuildException{
if (name == null) {
throw new BuildException("Name attribute is missing.");
}
return name;
}
/**
* Get the parameter value
*
* @return the parameter value
* @exception BuildException if the value is not set.
*/
public String getExpression() throws BuildException{
if (value == null) {
throw new BuildException("Expression attribute is missing.");
}
return value;
}
}
//-- Param
//
// Jacson - Text Filtering with Java.
// Copyright (C) 2002 Frank S. Nestel (nestefan -at- users.sourceforge.net)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -