public class ConfigurationImpl extends Object implements Configuration
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
<T> ClassNode<ExternalConstructor<T>> |
getBoundConstructor(ClassNode<T> cn)
Return the bound constructor.
|
Set<ClassNode<?>> |
getBoundConstructors() |
<T> ClassNode<T> |
getBoundImplementation(ClassNode<T> cn)
Returns the bound implementation.
|
Set<ClassNode<?>> |
getBoundImplementations() |
List<Object> |
getBoundList(NamedParameterNode<List<?>> np)
Get the list bound to a given NamedParameterNode.
|
Set<NamedParameterNode<List<?>>> |
getBoundLists() |
Set<Object> |
getBoundSet(NamedParameterNode<Set<?>> np)
Obtain the set of class hierarchy nodes or strings that were bound to a given NamedParameterNode.
|
Set<NamedParameterNode<Set<?>>> |
getBoundSets() |
ConfigurationBuilderImpl |
getBuilder() |
ClassHierarchy |
getClassHierarchy()
Configuration objects are associated with the ClassHierarchy objects that were used during validation.
|
<T> ConstructorDef<T> |
getLegacyConstructor(ClassNode<T> cn)
Return the LegacyConstructor that has been bound to this Class.
|
Set<ClassNode<?>> |
getLegacyConstructors() |
String |
getNamedParameter(NamedParameterNode<?> np)
Return the value of the given named parameter as an unparsed string.
|
Set<NamedParameterNode<?>> |
getNamedParameters() |
int |
hashCode() |
ConfigurationBuilder |
newBuilder()
Create a new ConfigurationBuilder object based on the same classpath
as this Configuration, and populate it with the configuration options
of this object.
|
public String getNamedParameter(NamedParameterNode<?> np)
Configuration
If nothing was explicitly bound, this method returns null (it does not return default values).
getNamedParameter
in interface Configuration
np
- A NamedParameter object from this Configuration's class hierarchy.Configuration.getClassHierarchy()
public <T> ClassNode<ExternalConstructor<T>> getBoundConstructor(ClassNode<T> cn)
Configuration
getBoundConstructor
in interface Configuration
T
- a typecn
- a class nodepublic Set<ClassNode<?>> getBoundImplementations()
getBoundImplementations
in interface Configuration
public Set<ClassNode<?>> getBoundConstructors()
getBoundConstructors
in interface Configuration
public Set<NamedParameterNode<?>> getNamedParameters()
getNamedParameters
in interface Configuration
public Set<ClassNode<?>> getLegacyConstructors()
getLegacyConstructors
in interface Configuration
public <T> ClassNode<T> getBoundImplementation(ClassNode<T> cn)
Configuration
getBoundImplementation
in interface Configuration
T
- a typecn
- a class nodepublic <T> ConstructorDef<T> getLegacyConstructor(ClassNode<T> cn)
Configuration
For now, only one legacy constructor can be bound per class.
TODO: Should this return Set<ConstructorDef<T>>
instead?
getLegacyConstructor
in interface Configuration
T
- a typecn
- a class nodepublic ConfigurationBuilder newBuilder()
Configuration
This API is unstable and should be considered private. Use the methods in org.apache.reef.Tang instead.
newBuilder
in interface Configuration
public ClassHierarchy getClassHierarchy()
Configuration
getClassHierarchy
in interface Configuration
public Set<Object> getBoundSet(NamedParameterNode<Set<?>> np)
Configuration
getBoundSet
in interface Configuration
np
- A NamedParameterNode from this Configuration's class hierarchy.Configuration.getClassHierarchy()
public List<Object> getBoundList(NamedParameterNode<List<?>> np)
Configuration
getBoundList
in interface Configuration
np
- Target NamedParameterpublic Set<NamedParameterNode<Set<?>>> getBoundSets()
getBoundSets
in interface Configuration
public Set<NamedParameterNode<List<?>>> getBoundLists()
getBoundLists
in interface Configuration
public ConfigurationBuilderImpl getBuilder()
Copyright © 2017 The Apache Software Foundation. All rights reserved.