@NotThreadSafe public static final class LightToken.Builder extends AbstractLightToken.AbstractBuilder<LightToken.Builder,LightToken> implements Serializable
Constructor and Description |
---|
Builder() |
Builder(ILightToken copy) |
Builder(LightToken.Builder copy) |
Modifier and Type | Method and Description |
---|---|
protected LightToken |
newInstance()
Method to be implemented by subtypes to create the right type
T of instances. |
protected void |
validate()
Validates the state of this Builder before allowing to create new instances of the built type
T . |
build, createdOn, id, issuer
public Builder()
public Builder(@Nonnull LightToken.Builder copy)
public Builder(@Nonnull ILightToken copy)
protected void validate() throws IllegalArgumentException
AbstractLightToken.AbstractBuilder
T
.validate
in class AbstractLightToken.AbstractBuilder<LightToken.Builder,LightToken>
IllegalArgumentException
- if the builder is not in a legal state allowing to proceed with the creation
of a T
instance.@Nonnull protected LightToken newInstance()
AbstractLightToken.AbstractBuilder
Method to be implemented by subtypes to create the right type T
of instances.
The typical implementation simply consists in writing return new MySubType(this);
newInstance
in class AbstractLightToken.AbstractBuilder<LightToken.Builder,LightToken>
T
instance based on this Builder instance.Copyright © 2020. All Rights Reserved.