<project name="hayashi" default="all" basedir=".">
<property name="src" value="${basedir}/src" />
+ <property name="obj" value="${basedir}/classes" />
<property name="doc" value="${basedir}/doc" />
<property name="report" value="${basedir}/report" />
<property file="build.properties" />
<target name="clean" description="Delete build directory">
<delete>
<fileset dir="${src}" includes="**/*.class" />
+ <fileset dir="${obj}" includes="**/*.class" />
</delete>
</target>
<!-- コンパイル -->
<target name="compile" depends="prepare" description="Compile Java Sources">
- <javac srcdir="${src}" destdir="${src}" encoding="UTF-8"
+ <javac srcdir="${src}" destdir="${obj}" encoding="UTF-8"
target="1.5" optimize="off" debug="on" verbose="false">
<include name="**/*.java" />
<classpath refid="compile.classpath"/>
<jar destfile="${appname}_${version}.jar">
<fileset file="README.txt"/>
<fileset dir="test" includes="**/*.class,**/*.java" />
- <fileset dir="${src}" includes="**/*.class,**/*.java" />
+ <fileset dir="${obj}" includes="**/*.class,**/*.java" />
<manifest>
<attribute name="Implementation-Title" value="${appname}"/>
<attribute name="Implementation-Version" value="hayashi lib ${version}"/>
@SuppressWarnings("serial")
public class PropertySelectItem extends PropertyItem {
+ @SuppressWarnings("unchecked")
public PropertySelectItem(hayashi.yuu.tools.properties.Properties prop, String name, String title, boolean editable, String[] items) {
super(prop, name, title, editable);
- field = new JComboBox();
- ((JComboBox)field).addActionListener(this);
+ field = new JComboBox<Object>();
+ ((JComboBox<?>)field).addActionListener(this);
for (int i=0; i < items.length; i++) {
- ((JComboBox)field).addItem(items[i]);
+ ((JComboBox<String>)field).addItem(items[i]);
}
createItem(name, title, prop.getProperty(name), editable);
}
void setupField(String name, String value, boolean editable) {
this.value = value;
- ((JComboBox)field).setSelectedItem(value);
+ ((JComboBox<?>)field).setSelectedItem(value);
if (!editable) {
field.setEnabled(editable);
@Override
public void actionPerformed(ActionEvent e) {
- this.value = (String) ((JComboBox)this.field).getSelectedItem();
+ this.value = (String) ((JComboBox<?>)this.field).getSelectedItem();
logger.info("[反映] "+ propertyName +" = "+ this.value);
prop.setProperty(propertyName, this.value);
}
class Command extends Thread {
String[] args; // コマンドパラメータ
private String commandName = ""; // コマンド名
- @SuppressWarnings("unchecked")
- private Class cmd; // 実行対象インスタンス
+ private Class<?> cmd; // 実行対象インスタンス
/**
* コンストラクタ:実行対象のインスタンスを得る
* @param cmd
*/
- @SuppressWarnings("unchecked")
- public Command(Class cmd) {
+ public Command(Class<?> cmd) {
super();
this.cmd = cmd;
this.commandName = cmd.getName();
return this.commandName;
}
- @SuppressWarnings("unchecked")
public void run() {
System.out.println("[START:"+ (new SimpleDateFormat("yyyy/MM/dd-HH:mm:ss")).format(new java.util.Date()) +"]\t"+ this.commandName);
for (int i=0; i < args.length; i++) {