@Test public void testGetQualifier() { assertThat( Version.getQualifier( "1.0-SNAPSHOT" ), equalTo( "SNAPSHOT" ) ); assertThat( Version.getQualifierWithDelim( "1.0-SNAPSHOT" ), equalTo( "-SNAPSHOT" ) ); assertThat( Version.getQualifier( "1.0.0.Beta1" ), equalTo( "Beta1" ) ); assertThat( Version.getQualifierWithDelim( "1.0.0.Beta1" ), equalTo( ".Beta1" ) ); assertThat( Version.getQualifier( "1.0.beta.1" ), equalTo( "beta.1" ) ); assertThat( Version.getQualifierWithDelim( "1.0.beta.1" ), equalTo( ".beta.1" ) ); assertThat( Version.getQualifier( "Beta1" ), equalTo( "Beta1" ) ); assertThat( Version.getQualifierWithDelim( "Beta1" ), equalTo( "Beta1" ) ); assertThat( Version.getQualifier( "1.x.2.beta1" ), equalTo( "x.2.beta1" ) ); assertThat( Version.getQualifierWithDelim( "1.x.2.beta1" ), equalTo( ".x.2.beta1" ) ); assertThat( Version.getQualifier( "1.2" ), equalTo( "" ) ); assertThat( Version.getQualifierWithDelim( "1.2" ), equalTo( "" ) ); assertThat( Version.getQualifier( "1.5-3_beta-SNAPSHOT-1" ), equalTo( "beta-SNAPSHOT-1" ) ); assertThat( Version.getQualifierWithDelim( "1.5-3_beta-SNAPSHOT-1" ), equalTo( "_beta-SNAPSHOT-1" ) ); assertThat( Version.getQualifierBase( "1.5-3_beta-SNAPSHOT-1" ), equalTo( "beta-SNAPSHOT" ) ); assertThat( Version.getOsgiVersion( "1.5-3_beta-SNAPSHOT-1" ), equalTo( "1.5.3.beta-SNAPSHOT-1" ) ); assertThat( Version.getQualifier( "_beta-SNAPSHOT-1" ), equalTo( "beta-SNAPSHOT-1" ) ); assertThat( Version.getQualifierWithDelim( "_beta-SNAPSHOT-1" ), equalTo( "_beta-SNAPSHOT-1" ) ); }
public static String getQualifier(String version) { Matcher versionMatcher = versionPattern.matcher( version ); if ( versionMatcher.matches() ) { return versionMatcher.group( 9 ); } return removeLeadingDelimiter( version ); }
Version { public static String getQualifier(String version) { Matcher versionMatcher = versionPattern.matcher( version ); if ( versionMatcher.matches() ) { return versionMatcher.group( 9 ); } return removeLeadingDelimiter( version ); } }
Version { public static String getQualifier(String version) { Matcher versionMatcher = versionPattern.matcher( version ); if ( versionMatcher.matches() ) { return versionMatcher.group( 9 ); } return removeLeadingDelimiter( version ); } private  Version(); }
Version { public static String getQualifier(String version) { Matcher versionMatcher = versionPattern.matcher( version ); if ( versionMatcher.matches() ) { return versionMatcher.group( 9 ); } return removeLeadingDelimiter( version ); } private  Version(); static String getBuildNumber(String version); static int getBuildNumberPadding( int incrementalSerialSuffixPadding, Set<String> versions ); static String getMMM(String version); static String getOsgiVersion(String version); static String getQualifier(String version); static String getQualifierBase(String version); static String getQualifierWithDelim(String version); static String getSnapshot( String version ); static String getSnapshotWithDelim( String version ); static boolean hasBuildNumber( String version ); static boolean hasQualifier( String version ); static boolean isEmpty( String string ); static boolean isSnapshot( String version ); static boolean isValidOSGi(String version); static String removeBuildNumber( String version ); static String removeSnapshot( String version ); static String appendQualifierSuffix( final String version, final String suffix ); static String setBuildNumber( String version, String buildNumber ); static String setSnapshot( String version, boolean snapshot ); static int findHighestMatchingBuildNumber(String version, Set<String> versionSet ); static int getIntegerBuildNumber( String version ); }
Version { public static String getQualifier(String version) { Matcher versionMatcher = versionPattern.matcher( version ); if ( versionMatcher.matches() ) { return versionMatcher.group( 9 ); } return removeLeadingDelimiter( version ); } private  Version(); static String getBuildNumber(String version); static int getBuildNumberPadding( int incrementalSerialSuffixPadding, Set<String> versions ); static String getMMM(String version); static String getOsgiVersion(String version); static String getQualifier(String version); static String getQualifierBase(String version); static String getQualifierWithDelim(String version); static String getSnapshot( String version ); static String getSnapshotWithDelim( String version ); static boolean hasBuildNumber( String version ); static boolean hasQualifier( String version ); static boolean isEmpty( String string ); static boolean isSnapshot( String version ); static boolean isValidOSGi(String version); static String removeBuildNumber( String version ); static String removeSnapshot( String version ); static String appendQualifierSuffix( final String version, final String suffix ); static String setBuildNumber( String version, String buildNumber ); static String setSnapshot( String version, boolean snapshot ); static int findHighestMatchingBuildNumber(String version, Set<String> versionSet ); static int getIntegerBuildNumber( String version ); static final String PROJECT_VERSION; }