public interface JavaClassHierarchy extends ClassHierarchy
Modifier and Type | Method and Description |
---|---|
Class<?> |
classForName(String name) |
Node |
getNode(Class<?> c)
Look up a class object in this ClassHierarchy.
|
<T> T |
parse(NamedParameterNode<T> name,
String value)
Parse a string value that has been passed into a named parameter.
|
<T> T |
parseDefaultValue(NamedParameterNode<T> name)
Obtain a parsed instance of the default value of a named parameter.
|
getNamespace, getNode, isImplementation, merge
Node getNode(Class<?> c)
The behavior of this method is undefined if the provided Class object is not from the ClassLoader (or an ancestor of the ClassLoader) associated with this JavaClassHierarchy. By default, Tang uses the default runtime ClassLoader as its root ClassLoader, so static references (expressions like getNode(Foo.class)) are safe.
c
- The class to be looked up in the class hierarchy.Class<?> classForName(String name) throws ClassNotFoundException
ClassNotFoundException
<T> T parse(NamedParameterNode<T> name, String value) throws ParseException
T
- A typename
- The named parameter that will receive the value.value
- A string value to be validated and parsed.ClassNode<? extends T>
.ParseException
- if the value failed to parse, or parsed to the
wrong type (such as when it specifies a class that does not implement
or extend T).<T> T parseDefaultValue(NamedParameterNode<T> name) throws ClassHierarchyException
T
- A typename
- The named parameter that should be checked for a default instance.ClassHierarchyException
- if an instance failed to parse.Copyright © 2017 The Apache Software Foundation. All rights reserved.