Top Fields Constructors Methods
io.smallrye.common.version

pack-priv final Class JpmsVersionIterator

extends AbstractVersionIterator
Class Inheritance
Static Imports
io.smallrye.common.version.Messages.msg

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
Inherited from io.smallrye.common.version.AbstractVersionIterator:
cookiestring

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
public boolean
hasNext()

Overrides io.smallrye.common.version.AbstractVersionIterator.hasNext.

Implements io.smallrye.common.version.VersionIterator.hasNext.

A basic implementation of VersionIterator#hasNext() which returns true if there are more characters after the current token.

protected boolean
isAlphaCodePoint(final int
the code point to test
cp
)

Overrides io.smallrye.common.version.AbstractVersionIterator.isAlphaCodePoint.

Determine whether the given code point is a valid alpha code point according to the current scheme.

public boolean
isEmptySeparator()

Overrides io.smallrye.common.version.AbstractVersionIterator.isEmptySeparator.

Implements io.smallrye.common.version.VersionIterator.isEmptySeparator.

Determine if the current token is an empty (or zero-length alphabetical-to-numeric or numeric-to-alphabetical) separator.

public boolean
protected boolean
isSeparatorCodePoint(final int
the code point to test
cp
)

Overrides io.smallrye.common.version.AbstractVersionIterator.isSeparatorCodePoint.

Determine whether the given code point is a valid separator according to the current scheme.

public void
next()

Overrides io.smallrye.common.version.AbstractVersionIterator.next.

Implements io.smallrye.common.version.VersionIterator.next.

A basic implementation of VersionIterator#next() which uses the methods on this class to establish the next iteration token.

protected int
numericCodePointValue(final int
the code point to test
cp
)

Overrides io.smallrye.common.version.AbstractVersionIterator.numericCodePointValue.

Determine whether the given code point is a valid numeric code point according to the current scheme, and if so, what the digit's numerical value is.

pack-priv void
skipTrailer(long mark)

Inherited from io.smallrye.common.version.AbstractVersionIterator:
appendAlphaPartToappendNumberPartToappendPartTochangeTypecompareAlphaPartcompareAlphaPartcompareNumberPartcompareNumberPartcompareNumberPartcompareNumberPartcookieToEndIndexcookieToExtraBitscookieToStartIndexcookieTypecurrentTypegetAlphaPartgetEndIndexgetExtraBitsgetNumberPartAsIntgetNumberPartAsLonggetNumberPartAsStringgetStartIndexinsertEmptyAlphainsertEmptyNumberinsertEmptySeparatorisAlphaPartisNumberPartisPartisSeparatorlengthmakeCookiemarkresetsetCurrentTokentoString

Field Detail

GOT_BUILDback to summary
pack-priv static final int GOT_BUILD
GOT_PRE_RELEASEback to summary
pack-priv static final int GOT_PRE_RELEASE

Constructor Detail

JpmsVersionIteratorback to summary
pack-priv JpmsVersionIterator(final String string)

Method Detail

getSeparatorCodePointback to summary
public int getSeparatorCodePoint()

Overrides io.smallrye.common.version.AbstractVersionIterator.getSeparatorCodePoint.

Implements io.smallrye.common.version.VersionIterator.getSeparatorCodePoint.

Doc from io.smallrye.common.version.VersionIterator.getSeparatorCodePoint.

Get the code point of the current separator. If the iterator is not positioned on a non-empty separator (i.e. isNonEmptySeparator() returns false), then an exception is thrown.

Returns:int

the code point of the current separator

hasNextback to summary
public boolean hasNext()

Overrides io.smallrye.common.version.AbstractVersionIterator.hasNext.

Implements io.smallrye.common.version.VersionIterator.hasNext.

Doc from io.smallrye.common.version.AbstractVersionIterator.hasNext.

A basic implementation of VersionIterator#hasNext() which returns true if there are more characters after the current token. Subclasses should generally override this basic behavior but may delegate to this implementation for convenience.

Returns:boolean

true if there are more characters after the current token, false otherwise

isAlphaCodePointback to summary
protected boolean isAlphaCodePoint(final int cp)

Overrides io.smallrye.common.version.AbstractVersionIterator.isAlphaCodePoint.

Doc from io.smallrye.common.version.AbstractVersionIterator.isAlphaCodePoint.

Determine whether the given code point is a valid alpha code point according to the current scheme. This basic implementation returns true for any character whose general category is in the set recognized by Character#isLetter(int). Subclasses may override this method to recognize a different set of alpha code points.

Parameters
cp:int

the code point to test

Returns:boolean

true if the code point is a valid letter, or false otherwise

isEmptySeparatorback to summary
public boolean isEmptySeparator()

Overrides io.smallrye.common.version.AbstractVersionIterator.isEmptySeparator.

Implements io.smallrye.common.version.VersionIterator.isEmptySeparator.

Doc from io.smallrye.common.version.VersionIterator.isEmptySeparator.

Determine if the current token is an empty (or zero-length alphabetical-to-numeric or numeric-to-alphabetical) separator. Note that some version schemes do not have empty separators.

Returns:boolean

true if the token is an empty separator, false otherwise

isNonEmptySeparatorback to summary
public boolean isNonEmptySeparator()

Overrides io.smallrye.common.version.AbstractVersionIterator.isNonEmptySeparator.

Implements io.smallrye.common.version.VersionIterator.isNonEmptySeparator.

Doc from io.smallrye.common.version.VersionIterator.isNonEmptySeparator.

Determine if the current token is a non-empty separator.

Returns:boolean

true if the token is a non-empty separator, false otherwise

isSeparatorCodePointback to summary
protected boolean isSeparatorCodePoint(final int cp)

Overrides io.smallrye.common.version.AbstractVersionIterator.isSeparatorCodePoint.

Doc from io.smallrye.common.version.AbstractVersionIterator.isSeparatorCodePoint.

Determine whether the given code point is a valid separator according to the current scheme. This basic implementation returns true for '.', '-', '+', and '_'. Subclasses may override this method to recognize a different set of separators.

Parameters
cp:int

the code point to test

Returns:boolean

true if the code point is a separator, or false otherwise

nextback to summary
public void next() throws NoSuchElementException, VersionSyntaxException

Overrides io.smallrye.common.version.AbstractVersionIterator.next.

Implements io.smallrye.common.version.VersionIterator.next.

Doc from io.smallrye.common.version.AbstractVersionIterator.next.

A basic implementation of VersionIterator#next() which uses the methods on this class to establish the next iteration token. This implementation consumes leading zeros from numeric parts but otherwise does not perform any transformations.

Exceptions
NoSuchElementException:
if there are no tokens left to iterate
VersionSyntaxException:
if the version string is unparseable due to syntax error
numericCodePointValueback to summary
protected int numericCodePointValue(final int cp)

Overrides io.smallrye.common.version.AbstractVersionIterator.numericCodePointValue.

Doc from io.smallrye.common.version.AbstractVersionIterator.numericCodePointValue.

Determine whether the given code point is a valid numeric code point according to the current scheme, and if so, what the digit's numerical value is. This basic implementation delegates to Character#digit(int, int) with a radix value of 10. Subclasses may override this method to recognize a different set of numeric code points.

Parameters
cp:int

the code point to test

Returns:int

the numerical value of the given code point, or -1 if the code point is not a valid numerical digit for this version scheme

skipTrailerback to summary
pack-priv void skipTrailer(long mark)