public static final class ClassDefEntity.Undefined extends ClassDefEntity
Modifier and Type | Class and Description |
---|---|
static class |
ClassDefEntity.Undefined.Builder
Builder.
|
ClassDefEntity.Undefined
ClassDef.Loader
ELEMENT_NAME, ENTITY_PREFIX
UUID_COMPARATOR
Constructor and Description |
---|
Undefined(String name)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
ClassDefEntity.Undefined |
copy()
Creates a copy of this entity.
|
<T> T |
createInstance(Class<T> expectedClass)
Creates an instance of the class.
|
String |
getClassName()
Gets the referenced class name.
|
Class<?> |
getInstanceClass()
Gets the class of instances created by this class definition.
|
String |
getMember()
Gets the package member name for the class.
|
String |
getPackageName()
Gets the package name for the class.
|
boolean |
isDefined()
Asks if this instance is defined.
|
boolean |
isLoaded()
Asks if the class has been loaded.
|
static ClassDefEntity.Undefined.Builder |
newBuilder()
Returns a new builder.
|
addImplemented, adjustLevel, compareTo, equals, getClassLib, getElementName, getImplemented, getInstanceClass, getLevel, getPrefix, getReferenceName, hashCode, is, is, toString
getAttributes, getName, getNameInUpperCase, getThisLogger, getUUID, setName, setUUID
public Undefined(@Nonnull String name)
name
- The entity name.public static ClassDefEntity.Undefined.Builder newBuilder()
public ClassDefEntity.Undefined copy()
copy
in interface Entity
copy
in class ClassDefEntity
public <T> T createInstance(Class<T> expectedClass)
Uses the class returned by ClassDef.getInstanceClass()
, thus
triggering the class loading if needed. If either the class loading or
the instance creation fails, an error message is logged and a null value
is returned.
createInstance
in interface ClassDef
createInstance
in class ClassDefEntity
T
- The type of the returned value.expectedClass
- The expected class.public String getClassName()
getClassName
in interface ClassDef
getClassName
in class ClassDefEntity
public Class<?> getInstanceClass()
If the class loading fails, an error message is logged and a null value is returned.
Before triggering the class loading, makes sure that the class library is known to the context class loader.
getInstanceClass
in interface ClassDef
getInstanceClass
in class ClassDefEntity
public String getMember()
getMember
in interface ClassDef
getMember
in class ClassDefEntity
public String getPackageName()
getPackageName
in interface ClassDef
getPackageName
in class ClassDefEntity
public boolean isDefined()
isDefined
in class ClassDefEntity
public boolean isLoaded()
isLoaded
in interface ClassDef
isLoaded
in class ClassDefEntity
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.