Class ImmutableProto.DeclaringType.Builder
java.lang.Object
org.immutables.value.processor.meta.ImmutableProto.DeclaringType.Builder
- Enclosing class:
ImmutableProto.DeclaringType
Builds instances of type
DeclaringType.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TypeElementprivate Proto.Environmentprivate static final longprivate static final longprivate static final longprivate longprivate Proto.Interning -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newDeclaringType.private static voidcheckNotIsSet(boolean isSet, String name) private voidelement(TypeElement element) Initializes the value for theelementattribute.private booleanenvironment(Proto.Environment environment) Initializes the value for theenvironmentattribute.private booleanprivate Stringinterner(Proto.Interning interner) Initializes the value for theinternerattribute.private boolean
-
Field Details
-
INIT_BIT_ENVIRONMENT
private static final long INIT_BIT_ENVIRONMENT- See Also:
-
INIT_BIT_INTERNER
private static final long INIT_BIT_INTERNER- See Also:
-
INIT_BIT_ELEMENT
private static final long INIT_BIT_ELEMENT- See Also:
-
initBits
private long initBits -
environment
-
interner
-
element
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
environment
Initializes the value for theenvironmentattribute.- Parameters:
environment- The value for environment- Returns:
thisbuilder for use in a chained invocation
-
interner
Initializes the value for theinternerattribute.- Parameters:
interner- The value for interner- Returns:
thisbuilder for use in a chained invocation
-
element
Initializes the value for theelementattribute.- Parameters:
element- The value for element- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newDeclaringType.- Returns:
- An immutable instance of DeclaringType
- Throws:
IllegalStateException- if any required attributes are missing
-
environmentIsSet
private boolean environmentIsSet() -
internerIsSet
private boolean internerIsSet() -
elementIsSet
private boolean elementIsSet() -
checkNotIsSet
-
checkRequiredAttributes
private void checkRequiredAttributes() -
formatRequiredAttributesMessage
-