if(value == null) {
throw new IllegalArgumentException("Provided component selector may not be null");
}
if(value instanceof DefaultModuleComponentSelector) {
ModuleComponentSelector moduleComponentSelector = (ModuleComponentSelector)value;
encoder.writeByte(Implementation.MODULE.getId());
encoder.writeString(moduleComponentSelector.getGroup());
encoder.writeString(moduleComponentSelector.getModule());
encoder.writeString(moduleComponentSelector.getVersion());
} else if(value instanceof DefaultProjectComponentSelector) {
ProjectComponentSelector projectComponentSelector = (ProjectComponentSelector)value;
encoder.writeByte(Implementation.BUILD.getId());
encoder.writeString(projectComponentSelector.getProjectPath());
} else {