import java.util.*;

public class TestHeuristic {
    public static void main(String[] args) {
        System.out.println(isFullyQualifiedMethod("TransformerImpl.transform"));
        System.out.println(isFullyQualifiedMethod("Transformer.transform"));
    }
    
    private static boolean isFullyQualifiedMethod(String methodFqn) {
        if (methodFqn == null || !methodFqn.contains(".")) return false;
        int lastDot = methodFqn.lastIndexOf('.');
        String classPart = methodFqn.substring(0, lastDot);
        if (classPart.contains(".")) return true;
        if (!classPart.isEmpty() && Character.isUpperCase(classPart.charAt(0))) return true;
        return false;
    }
}
