public class Aaaaaaa { void bar(Object foo) { if (foo instanceof String) { fo.substr<caret> } } }