Menu

demand a class but not a object?@@.

Help
2005-01-21
2013-04-27
  • mikeliu1976

    mikeliu1976 - 2005-01-21

    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

     
    • Derrick Oswald

      Derrick Oswald - 2005-01-21

      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.

       
    • mikeliu1976

      mikeliu1976 - 2005-01-23

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.