public class ClassLibEntity extends AbstractEntity
Modifier and Type | Class and Description |
---|---|
static class |
ClassLibEntity.Builder
Builder.
|
static class |
ClassLibEntity.Undefined
Undefined.
|
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT_NAME
ClassLib element name.
|
static String |
ENTITY_PREFIX
ClassLib entity prefix.
|
UUID_COMPARATOR
Modifier and Type | Method and Description |
---|---|
void |
adjustLevel()
Adjust the level of this class library dependencies.
|
int |
compareTo(Entity other)
Implements Comparable.
|
ClassLibEntity |
copy()
Creates a copy of this entity.
|
boolean |
equals(Object other)
|
Optional<Boolean> |
getCached()
Gets the cached indicator.
|
List<ClassLibEntity> |
getClassLibs()
Gets the included class libraries.
|
String |
getElementName()
Gets the entity element name.
|
int |
getLevel()
Gets this class library level.
|
List<URI> |
getLocations()
Gets a list of the locations from which this class library may be
fetched.
|
String |
getPrefix()
Gets the class prefix.
|
String |
getReferenceName()
Gets the entity reference name.
|
int |
hashCode() |
boolean |
isAdded()
Asks if this class library has been added to the CLASSPATH.
|
boolean |
isCached(boolean defaultValue)
Asks if this class library is cached.
|
boolean |
isDefined()
Asks if this class library is defined.
|
static ClassLibEntity.Builder |
newBuilder()
Returns a new builder.
|
void |
setAdded(boolean added)
Sets the added indicator.
|
getAttributes, getName, getNameInUpperCase, getThisLogger, getUUID, setName, setUUID, toString
public static final String ELEMENT_NAME
public static final String ENTITY_PREFIX
@Nonnull @CheckReturnValue public static ClassLibEntity.Builder newBuilder()
public final void adjustLevel() throws TopologicalErrorException
TopologicalErrorException
- When a recursive reference is found.public final int compareTo(Entity other)
compareTo
in interface Comparable<Entity>
compareTo
in class AbstractEntity
other
- An other Entity.public ClassLibEntity copy()
public final boolean equals(Object other)
For two Entity
to be equal, they must at least be instances of
the same class, have the same UUID
and name.
equals
in class AbstractEntity
@Nonnull @CheckReturnValue public final Optional<Boolean> getCached()
@Nonnull @CheckReturnValue public final List<ClassLibEntity> getClassLibs()
public final String getElementName()
The entity element is used to in the generation of the entity URI.
@CheckReturnValue public final int getLevel()
The class library level help control the declaration order to avoid forward references.
@Nonnull @CheckReturnValue public final List<URI> getLocations()
public final String getPrefix()
Each concrete entity subclass has its own prefix which will be the same for all its instances. This prefix is used to avoid name collision between different classes in a common registry.
public String getReferenceName()
public final int hashCode()
hashCode
in class AbstractEntity
@CheckReturnValue public final boolean isAdded()
@CheckReturnValue public final boolean isCached(boolean defaultValue)
defaultValue
- The default value.@CheckReturnValue public boolean isDefined()
public final void setAdded(boolean added)
added
- The added indicator.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.