Class ImmutableMavenProtocPlugin
java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.ImmutableMavenProtocPlugin
- All Implemented Interfaces:
MavenArtifact
,MavenProtocPlugin
,ProtocPlugin
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableMavenProtocPlugin
extends Object
implements MavenProtocPlugin
Immutable implementation of
MavenProtocPlugin
.
Use the builder to create immutable instances:
ImmutableMavenProtocPlugin.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableMavenProtocPlugin
.private final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final @Nullable String
private final @Nullable DependencyResolutionDepth
private final Set
<MavenExclusionBean> private final String
private final boolean
private final @Nullable String
private final @Nullable String
private final int
private static final byte
private static final byte
private static final byte
private final @Nullable String
private final @NonNull String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableMavenProtocPlugin
.private static <T> List
<T> createSafeList
(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls) private static <T> List
<T> createUnmodifiableList
(boolean clone, List<T> list) private static <T> Set
<T> createUnmodifiableSet
(List<T> list) Unmodifiable set constructed from list to avoid rehashing.boolean
This instance is equal to all instances ofImmutableMavenProtocPlugin
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableMavenProtocPlugin another) Get the artifact ID.@Nullable String
Get the artifact classifier.@Nullable DependencyResolutionDepth
The dependency resolution depth.private @Nullable DependencyResolutionDepth
Get a set of dependency exclusions to apply when resolving dependencies.Get the group ID.Get the command line arguments to pass to the JVM.Get the arguments to pass to the JVM to configure it.@Nullable String
The main class entrypoint to use if the plugin is not an assembled JAR.@Nullable String
int
getOrder()
private int
@Nullable String
getType()
Get the artifact type.@NonNull String
Get the version of theprotoc
plugin.int
hashCode()
Computes a hash code from attributes:groupId
,artifactId
,type
,classifier
,exclusions
,options
,order
,isSkip
,version
,jvmArgs
,dependencyResolutionDepth
,jvmConfigArgs
,mainClass
.boolean
isSkip()
private boolean
toString()
Prints the immutable valueMavenProtocPlugin
with attribute values.
-
Field Details
-
groupId
-
artifactId
-
type
-
classifier
-
exclusions
-
options
-
order
private final int order -
isSkip
private final boolean isSkip -
version
-
jvmArgs
-
dependencyResolutionDepth
-
jvmConfigArgs
-
mainClass
-
STAGE_INITIALIZING
private static final byte STAGE_INITIALIZING- See Also:
-
STAGE_UNINITIALIZED
private static final byte STAGE_UNINITIALIZED- See Also:
-
STAGE_INITIALIZED
private static final byte STAGE_INITIALIZED- See Also:
-
initShim
-
-
Constructor Details
-
ImmutableMavenProtocPlugin
-
-
Method Details
-
getOrderInitialize
private int getOrderInitialize() -
isSkipInitialize
private boolean isSkipInitialize() -
getDependencyResolutionDepthInitialize
-
getGroupId
Get the group ID.- Specified by:
getGroupId
in interfaceMavenArtifact
- Returns:
- the group ID.
-
getArtifactId
Get the artifact ID.- Specified by:
getArtifactId
in interfaceMavenArtifact
- Returns:
- the artifact ID.
-
getType
Get the artifact type.May be
null
if the default should be used.- Specified by:
getType
in interfaceMavenArtifact
- Returns:
- the artifact type.
-
getClassifier
Get the artifact classifier.May be
null
if no classifier is set.- Specified by:
getClassifier
in interfaceMavenArtifact
- Returns:
- the artifact classifier.
-
getExclusions
Get a set of dependency exclusions to apply when resolving dependencies.- Specified by:
getExclusions
in interfaceMavenArtifact
- Returns:
- the exclusions, which by default is empty.
-
getOptions
- Specified by:
getOptions
in interfaceProtocPlugin
- Returns:
- The value of the
options
attribute
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceProtocPlugin
- Returns:
- The value of the
order
attribute
-
isSkip
public boolean isSkip()- Specified by:
isSkip
in interfaceProtocPlugin
- Returns:
- The value of the
isSkip
attribute
-
getVersion
Get the version of theprotoc
plugin.This must be specified for plugins.
- Specified by:
getVersion
in interfaceMavenArtifact
- Specified by:
getVersion
in interfaceMavenProtocPlugin
- Returns:
- the protoc plugin version to use.
-
getJvmArgs
Get the command line arguments to pass to the JVM.This defaults to an empty list.
- Specified by:
getJvmArgs
in interfaceMavenProtocPlugin
- Returns:
- the list of command line arguments to pass to the JVM.
- Since:
- 2.6.0
-
getDependencyResolutionDepth
The dependency resolution depth.This cannot be changed for this type of plugin.
- Specified by:
getDependencyResolutionDepth
in interfaceMavenArtifact
- Specified by:
getDependencyResolutionDepth
in interfaceMavenProtocPlugin
- Returns:
null
, always.
-
getJvmConfigArgs
Get the arguments to pass to the JVM to configure it.Users can use this to control concerns such as heap memory controls, GC and JIT settings, and specifying additional JVM options.
- Specified by:
getJvmConfigArgs
in interfaceMavenProtocPlugin
- Returns:
- the list of command line arguments to pass to the JVM.
- Since:
- 2.6.0
-
getMainClass
The main class entrypoint to use if the plugin is not an assembled JAR.Ignored in all other cases.
- Specified by:
getMainClass
in interfaceMavenProtocPlugin
- Returns:
- the main class name.
- Since:
- 2.5.0
-
equals
-
equalTo
-
hashCode
-
toString
-
builder
Creates a builder forImmutableMavenProtocPlugin
.ImmutableMavenProtocPlugin.builder() .groupId(String | null) // nullable
groupId
.artifactId(String | null) // nullableartifactId
.type(@org.jspecify.annotations.Nullable String | null) // nullabletype
.classifier(@org.jspecify.annotations.Nullable String | null) // nullableclassifier
.addExclusions|addAllExclusions(MavenExclusionBean) //exclusions
elements .options(@org.jspecify.annotations.Nullable String | null) // nullableoptions
.order(int) // optionalorder
.isSkip(boolean) // optionalisSkip
.version(@org.jspecify.annotations.NonNull String | null) // nullableversion
.jvmArgs(@org.jspecify.annotations.Nullable List<String> | null) // nullablejvmArgs
.jvmConfigArgs(@org.jspecify.annotations.Nullable List<String> | null) // nullablejvmConfigArgs
.mainClass(@org.jspecify.annotations.Nullable String | null) // nullablemainClass
.build();- Returns:
- A new ImmutableMavenProtocPlugin builder
-
createSafeList
-
createUnmodifiableList
-
createUnmodifiableSet
-