@Test(expected = IllegalStateException.class) public void wrongEnterV() { testSubject.onEnterBaseVersion("foo"); }
public boolean onEnterBaseVersion(final String baseVersion) { checkState(groupId != null); checkState(artifactId != null); checkNotNull(baseVersion); if (Objects.equals(baseVersion, this.baseVersion)) { return false; } this.baseVersion = baseVersion; latestVersionCoordinatesMap.clear(); latestVersionCoordinates = null; log.debug("-> GAbV: {}:{}:{}", groupId, artifactId, baseVersion); return true; }
MetadataBuilder extends ComponentSupport { public boolean onEnterBaseVersion(final String baseVersion) { checkState(groupId != null); checkState(artifactId != null); checkNotNull(baseVersion); if (Objects.equals(baseVersion, this.baseVersion)) { return false; } this.baseVersion = baseVersion; latestVersionCoordinatesMap.clear(); latestVersionCoordinates = null; log.debug("-> GAbV: {}:{}:{}", groupId, artifactId, baseVersion); return true; } }
MetadataBuilder extends ComponentSupport { public boolean onEnterBaseVersion(final String baseVersion) { checkState(groupId != null); checkState(artifactId != null); checkNotNull(baseVersion); if (Objects.equals(baseVersion, this.baseVersion)) { return false; } this.baseVersion = baseVersion; latestVersionCoordinatesMap.clear(); latestVersionCoordinates = null; log.debug("-> GAbV: {}:{}:{}", groupId, artifactId, baseVersion); return true; } MetadataBuilder(); }
MetadataBuilder extends ComponentSupport { public boolean onEnterBaseVersion(final String baseVersion) { checkState(groupId != null); checkState(artifactId != null); checkNotNull(baseVersion); if (Objects.equals(baseVersion, this.baseVersion)) { return false; } this.baseVersion = baseVersion; latestVersionCoordinatesMap.clear(); latestVersionCoordinates = null; log.debug("-> GAbV: {}:{}:{}", groupId, artifactId, baseVersion); return true; } MetadataBuilder(); boolean onEnterGroupId(final String groupId); @Nullable Maven2Metadata onExitGroupId(); boolean addPlugin(final String prefix, final String artifactId, final String name); boolean onEnterArtifactId(final String artifactId); @Nullable Maven2Metadata onExitArtifactId(); boolean onEnterBaseVersion(final String baseVersion); @Nullable Maven2Metadata onExitBaseVersion(); void addArtifactVersion(final MavenPath mavenPath); }
MetadataBuilder extends ComponentSupport { public boolean onEnterBaseVersion(final String baseVersion) { checkState(groupId != null); checkState(artifactId != null); checkNotNull(baseVersion); if (Objects.equals(baseVersion, this.baseVersion)) { return false; } this.baseVersion = baseVersion; latestVersionCoordinatesMap.clear(); latestVersionCoordinates = null; log.debug("-> GAbV: {}:{}:{}", groupId, artifactId, baseVersion); return true; } MetadataBuilder(); boolean onEnterGroupId(final String groupId); @Nullable Maven2Metadata onExitGroupId(); boolean addPlugin(final String prefix, final String artifactId, final String name); boolean onEnterArtifactId(final String artifactId); @Nullable Maven2Metadata onExitArtifactId(); boolean onEnterBaseVersion(final String baseVersion); @Nullable Maven2Metadata onExitBaseVersion(); void addArtifactVersion(final MavenPath mavenPath);  }