手上有一个工程,使用ant编译的时候报错:无法将 adms.form.logic.Expression 中的 getValue() 应用于 (adms.form.excel.CReport)
value = (String)exp.getValue( this.runner );adms.form.logic.Expression的getValue方法声明如下: public Object getValue(Object data)
{
//实现代码略
} public Object getValue()
{
//实现代码略
}
adms.form.excel.CReport的runner变量的类型为CReport: protected CReport runner;ant脚本如下:<project name="TestPrj" default="dist" basedir="."> <!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="bin" location="bin"/>
<property name="dist" location="dist"/> <target name="init">
<!-- Create the time stamp -->
<delete dir="${bin}"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${bin}"/>
</target> <path id="classpath">
<fileset dir="${lib}" includes="*.jar"/>
</path> <target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${bin} -->
<javac srcdir="${src}" destdir="${bin}" classpathref="classpath" source="1.5" target="1.5" />
</target>
<!-- 其它部分略 -->
</project>搞不懂为什么会报错。另外奇怪的是这个工程在Eclipse中可以正常编译!请各位大大指点一下。
value = (String)exp.getValue( this.runner );adms.form.logic.Expression的getValue方法声明如下: public Object getValue(Object data)
{
//实现代码略
} public Object getValue()
{
//实现代码略
}
adms.form.excel.CReport的runner变量的类型为CReport: protected CReport runner;ant脚本如下:<project name="TestPrj" default="dist" basedir="."> <!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="bin" location="bin"/>
<property name="dist" location="dist"/> <target name="init">
<!-- Create the time stamp -->
<delete dir="${bin}"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${bin}"/>
</target> <path id="classpath">
<fileset dir="${lib}" includes="*.jar"/>
</path> <target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${bin} -->
<javac srcdir="${src}" destdir="${bin}" classpathref="classpath" source="1.5" target="1.5" />
</target>
<!-- 其它部分略 -->
</project>搞不懂为什么会报错。另外奇怪的是这个工程在Eclipse中可以正常编译!请各位大大指点一下。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货