(. String (getName))
says - call String.getName() - fails, getName is not a static method
of class String
'.' is a special form with special evaluation rules. In particular, it
checks to see if the first arg (unevaluated) names a class, if so the
call is considered a static call of that class. getName is not a
static method of class String.
In normal evaluation contexts, String represents the class object
String, which is of type Class. You want to call an instance method on
this object. To do so, you need to bypass the special evaluation of
the '.' here - identity makes the most sense:
(. (identity String) (getName))
says String.class.getName() - works getName is an instance method of
class Class
Rich