i have following line of code:
silk.<dombutton>find(buttonsubmitsearchxpathmain).select();
i've never seen method being accompanied <xxx>
. have few other methods same brackets different words. unfortunately i'm unable read source method. can please explain it? description of method? purpose of it? can read it?
it's call static generic method. have @ article. generics allow generic programming.
for example generic class:
public class genericclass<t>{}
where generic type t determined @ compile time while instantiating class.
genericclass<string> class = new genericclass<string>();
you can force generic type descendant of particular type. example:
public class genericclass<t extends jcomponent>{}
this useful allow generic programming because inside method can threat generic type independently of real type.for example:
public class genericclass<t extends jcomponent>{ private t component; public void showcomponent(){ t.setvisible(true); //you can call method. t jcomponent or subclass of } }
in case specifying generic type while calling static method, because of static nature invoked without having instance.
Comments
Post a Comment