*/
package org.opendaylight.yangtools.yang.model.ri.stmt.impl.eff;
-import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
final ImmutableList<? extends EffectiveStatement<?, ?>> substatements,
final @NonNull SourceIdentifier importedSource) {
super(declared, substatements);
- this.revision = importedSource.getRevision().orElse(null);
- this.semVer = importedSource instanceof SemVerSourceIdentifier
+ revision = importedSource.getRevision().orElse(null);
+ semVer = importedSource instanceof SemVerSourceIdentifier
? ((SemVerSourceIdentifier) importedSource).getSemanticVersion().orElse(null)
: null;
}
}
@Override
+ @Deprecated(since = "8.0.4", forRemoval = true)
public Optional<SemVer> getSemanticVersion() {
return Optional.ofNullable(semVer);
}
public ImportEffectiveStatement asEffectiveStatement() {
return this;
}
-
- @Override
- public String toString() {
- return MoreObjects.toStringHelper(this).omitNullValues()
- .add("moduleName", getModuleName())
- .add("revision", revision)
- .add("version", semVer)
- .add("prefix", getPrefix())
- .add("description", getDescription().orElse(null))
- .add("reference", getReference().orElse(null))
- .toString();
- }
}