RefEntity (final String type, final String fqName) { if (IMPLICIT_CONSTRUCTOR.equals(type)) { return getImplicitConstructor(fqName); } if (METHOD.equals(type)) { return RefMethodImpl.methodFromExternalName(myRefManager, fqName); } if (CLASS.equals(type)) { return RefClassImpl.classFromExternalName(myRefManager, fqName); } if (FIELD.equals(type)) { return RefFieldImpl.fieldFromExternalName(myRefManager, fqName); } if (PARAMETER.equals(type)) { return RefParameterImpl.parameterFromExternalName(myRefManager, fqName); } if (PACKAGE.equals(type)) { return RefPackageImpl.packageFromFQName(myRefManager, fqName); } if (JAVA_MODULE.equals(type)) { return RefJavaModuleImpl.moduleFromExternalName(myRefManager, fqName); } return null; }