public static Builder create(ExtensionDefinitionContract contract) { if (contract == null) { throw new IllegalArgumentException("contract was null"); } Builder builder = create(contract.getName(), contract.getType(), contract.getResourceDescriptor()); builder.setId(contract.getId()); builder.setApplicationId(contract.getApplicationId()); builder.setLabel(contract.getLabel()); builder.setDescription(contract.getDescription()); builder.setConfiguration(contract.getConfiguration()); builder.setVersionNumber(contract.getVersionNumber()); return builder; }