public class PropertyRegistration extends Object implements Comparable<PropertyRegistration>
Property
with AndHow during startup at run time.
Property.
Matching service files are also generated in the "META-INF/services/"
directory so the PropertyRegistrar instances can be discovered
through the java.util.ServiceLoader mechanism.
At run time, the PropertyRegistrarLoader discovers all
PropertyRegistrar instances.
Each PropertyRegistrar creates a PropertyRegistrationList
instance with a PropertyRegistration for each Property
present in the jar.
| Modifier and Type | Method and Description |
|---|---|
int |
compareInnerPathTo(PropertyRegistration o)
Equivalent to compareTo for just the inner path class and its fully qualified path.
|
int |
compareRootTo(PropertyRegistration o)
Equivalent to compareTo for just the root class and its fully qualified path.
|
int |
compareTo(PropertyRegistration o)
Comparison that results in sorting from root properties to the most
nested, incrementally by each inner path step.
|
String |
getCanonicalParentName()
The AndHow canonical name of the direct parent of the AndHow Property.
|
String |
getCanonicalPropertyName()
The AndHow canonical name of the property, which is the root canonical
name plus the elements of the inner path and the property name, all
separated by dots.
|
String |
getCanonicalRootName()
The canonical propName of the root class, which is the top level class,
typically one per Java source file (unless someone has stuffed multiple
top level classes into a single file, which is technically allowed).
|
String[] |
getInnerPath()
The names of the nested inner classes/interfaces containing the
named property for this registration.
|
int |
getInnerPathLength()
The number of nested inner classes / interfaces from the root class to
the inner class containing the AndHow Property.
|
String |
getJavaCanonicalParentName()
The Java canonical name of the direct parent of the AndHow Property.
|
String |
getPropertyName()
The name of the AndHow property, which is the name of the variable it
is assigned to where it is constructed.
|
public String getCanonicalRootName()
Property declaration, or in the case of a Property
declared in an inner class, the name of the class containing the inner class.public String getPropertyName()
Property declaration.public String[] getInnerPath()
If a class Foo contained an inner class Bar, which contained an
inner class Baz, which contained an AndHow property declaration
assigned to a variable named Boo:
getCanonicalRootName would return Foo's canonical pathgetInnerPath would return the array of "Bar", "Baz"getPropertyName would return "Boo"Property is declared directly in a root class.public int getInnerPathLength()
Property declared
directly in a root class with have a length of zero.public String getCanonicalPropertyName()
Property, which
uses dots to separate each step.public String getJavaCanonicalParentName()
Class.forName
For the inner class InnerClass of class
com.fastco.ClassName, the canonical names would be:
com.fastco.ClassName$InnerClass
com.fastco.ClassName.InnerClass
Property.public String getCanonicalParentName()
Class.forName
For the inner class InnerClass of class
com.fastco.ClassName, the canonical names would be:
com.fastco.ClassName$InnerClass
com.fastco.ClassName.InnerClass
Property.public int compareRootTo(PropertyRegistration o)
o - The PropertyRegistration to compare to.public int compareInnerPathTo(PropertyRegistration o)
o - The PropertyRegistration to compare to.public int compareTo(PropertyRegistration o)
compareTo in interface Comparable<PropertyRegistration>o - The PropertyRegistration to compare to.Copyright © 2022. All rights reserved.