| Package | Description |
|---|---|
| com.ibm.cos.v2.core | |
| com.ibm.cos.v2.core.traits |
| Modifier and Type | Method and Description |
|---|---|
boolean |
SdkField.containsTrait(Class<? extends Trait> clzz,
TraitType type)
Checks if a given
Trait is present on the field. |
<T extends Trait> |
SdkField.getOptionalTrait(Class<T> clzz,
TraitType type)
Gets the trait of the specified class if available.
|
<T extends Trait> |
SdkField.getRequiredTrait(Class<T> clzz,
TraitType type)
Gets the trait of the specified class, or throw
IllegalStateException if not available. |
<T extends Trait> |
SdkField.getTrait(Class<T> clzz,
TraitType type)
Gets the trait of the specified class and known type if available.
|
| Modifier and Type | Method and Description |
|---|---|
static TraitType |
TraitType.from(Class<?> clazz)
Returns the type for the given class.
|
TraitType |
PayloadTrait.type() |
TraitType |
DefaultValueTrait.type() |
TraitType |
TimestampFormatTrait.type() |
TraitType |
LocationTrait.type() |
TraitType |
ListTrait.type() |
TraitType |
JsonValueTrait.type() |
TraitType |
XmlAttributesTrait.type() |
TraitType |
RequiredTrait.type() |
TraitType |
DataTypeConversionFailureHandlingTrait.type() |
default TraitType |
Trait.type()
The known trait type.
|
TraitType |
XmlAttributeTrait.type() |
TraitType |
MapTrait.type() |
static TraitType |
TraitType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TraitType[] |
TraitType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Copyright © 2026. All rights reserved.