Is there a way to shorten type names in java. Something similar to typedef
in c++ or similar to the usage of namespaces?
For example if I have the type "org.w3c.dom.Node" and I don't want to write
that full name every time, but also don't want to do import on the whole file
but just localy define the type of "Node" to be "org.w3c.dom.Node" on one method?
No, there's no way to create an alias "locally" (I take it by "locally" you mean within a method, since you said you don't want to do an import
at the top of the file, which is "local" to the file).