It works the same way it would in Java. If you have a class called
MyClass you would access it using the class name. The visibility of the
constructors (public, private, etc.) is irrelevant because you are not
instantiating an instance of the class. If the class is not declared
locally or included as a default import, you need to ensure it is included
in your classpath and import it in your script.
I suggest reading:
For information re: classpaths, importing, etc. I would pick up Pat's book
> Suppose I have a Class A which does not have public constructor, how can I
> access the class's public static field?
> I tried this
> Class a=getClass("A")
> a.members=new ArrayList();
> but it does not work.
Get latest updates about Open Source Projects, Conferences and News.