public final class TraitInfo extends Object
Modifier and Type | Method and Description |
---|---|
TraitInfo |
asDefaultTrait() |
static TraitInfo |
create(Class<? extends Trait> trait)
Constructs a factory with the given trait class.
|
Class<? extends Trait> |
getTraitClass() |
String |
getTraitName() |
boolean |
isDefaultTrait() |
<T extends Trait> |
tryCreateInstance() |
TraitInfo |
withName(String name) |
TraitInfo |
withSupplier(com.google.common.base.Supplier<? extends Trait> supplier) |
public TraitInfo asDefaultTrait()
public String getTraitName()
public boolean isDefaultTrait()
public <T extends Trait> T tryCreateInstance()
public TraitInfo withSupplier(com.google.common.base.Supplier<? extends Trait> supplier)
public static TraitInfo create(Class<? extends Trait> trait)
trait
- Class of the traitTraitInfo
IllegalArgumentException
- If the trait class does not have a no-arguments constructorCopyright © 2021. All rights reserved.