regards:
why a object's method could demand a class but not a object? ...@@
Node [] images = parser.extractAllNodesThatAre(ImageTag.class); ^^^^^^^^^^^^^^^^^^
thank you may god be with you
A class is an object. It's the meta object that describes a class. Similar code is:
ImageTag tag = new ImageTag (); Class cls = tag.getClass (); extractAllNodesThatAre (cls);
or
extractAllNodesThatMatch (new NodeClassFilter (cls));
The extractAllNodesThatAre method compares each node with the given tag class and if it matches, adds it to the list.
Thank you for reply.I find this project is good. and read some discussions on http://sourceforge.net/mail/?group_id=24399 It is good.Hope that this project will succeed.
Log in to post a comment.
regards:
why a object's method could demand a class but not a object?
...@@
Node [] images = parser.extractAllNodesThatAre(ImageTag.class);
^^^^^^^^^^^^^^^^^^
thank you
may god be with you
A class is an object.
It's the meta object that describes a class.
Similar code is:
ImageTag tag = new ImageTag ();
Class cls = tag.getClass ();
extractAllNodesThatAre (cls);
or
extractAllNodesThatMatch (new NodeClassFilter (cls));
The extractAllNodesThatAre method compares each node with the given tag class and if it matches, adds it to the list.
regards:
Thank you for reply.I find this project is good.
and read some discussions on
http://sourceforge.net/mail/?group_id=24399
It is good.Hope that this project will succeed.
thank you
may god be with you