ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: why rmic task doesn't support selector? + others
Date Wed, 29 May 2002 07:40:14 GMT
On Tue, 28 May 2002, Levente Farkas <lfarkas@mindmaker.hu> wrote:

> what is the most often used fileset with rmic?  those classes which
> implements Remote and not an interface. and how can I select them
> now?

Set the verify attribute to true.

I admit the documentation is really, really bad at this point, but
you've made your live very difficult and gain nothing.

If you set verify to true, all classes that return nun-null here and
are no interfaces will be skipped (interfaces will be accepted in the
idl and iiop cases):

    /**
     * Returns the topmost interface that extends Remote for a given
     * class - if one exists.
     */
    public Class getRemoteInterface(Class testClass) {
        if (Remote.class.isAssignableFrom(testClass)) {
            Class [] interfaces = testClass.getInterfaces();
            if (interfaces != null) {
                for (int i = 0; i < interfaces.length; i++) {
                    if (Remote.class.isAssignableFrom(interfaces[i])) {
                        return interfaces[i];
                    }
                }
            }
        }
        return null;
    }

i.e. the verify attribute works as an implicit selector.

> another problem with <path> that dirset is not supported:-(

It is (in 1.5beta1, that is).

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message