CppBinaryImpl (@Nullable org.gradle.tooling.model.cpp.CppBinary binary) { CppBinaryImpl cppBinary; if (binary instanceof CppExecutable) { cppBinary = new CppExecutableImpl(binary.getName(), binary.getBaseName(), binary.getVariantName()); } else if (binary instanceof CppSharedLibrary) { cppBinary = new CppSharedLibraryImpl(binary.getName(), binary.getBaseName(), binary.getVariantName()); } else if (binary instanceof CppStaticLibrary) { cppBinary = new CppStaticLibraryImpl(binary.getName(), binary.getBaseName(), binary.getVariantName()); } else { return null; } cppBinary.setCompilationDetails(convert(binary.getCompilationDetails())); cppBinary.setLinkageDetails(convert(binary.getLinkageDetails())); return cppBinary; }