|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kohsuke.stapler.lang.KlassNavigator<C>
public abstract class KlassNavigator<C>
Strategy pattern to provide navigation across class-like objects in other languages of JVM.
Implementations should be stateless and typically a singleton.
Field Summary | |
---|---|
static KlassNavigator<java.lang.Class> |
JAVA
|
Constructor Summary | |
---|---|
KlassNavigator()
|
Method Summary | |
---|---|
abstract java.lang.Iterable<Klass<?>> |
getAncestors(C clazz)
Lists up all the ancestor classes, from specific to general, without any duplicate. |
abstract java.net.URL |
getResource(C clazz,
java.lang.String resourceName)
Loads the resources associated with this class. |
abstract Klass<?> |
getSuperClass(C clazz)
Gets the super class. |
abstract java.lang.Class |
toJavaClass(C clazz)
For backward compatibility, map the given class to the closest Java equivalent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final KlassNavigator<java.lang.Class> JAVA
Constructor Detail |
---|
public KlassNavigator()
Method Detail |
---|
public abstract java.net.URL getResource(C clazz, java.lang.String resourceName)
In stapler, the convention is that the "associated" resources live in the directory named after
the fully qualified class name (as opposed to the behavior of Class.getResource(String)
,
that looks for resources in the same package as the class.)
But other languages can choose their own conventions if it makes more sense to do so. For example, stapler-jruby uses camelized class name.
Implementation must consult MetaClassLoader.debugLoader
if it's available. Implementation
must not look for resources in the base type. That operation is performed by the caller when
needed.
public abstract java.lang.Iterable<Klass<?>> getAncestors(C clazz)
public abstract Klass<?> getSuperClass(C clazz)
public abstract java.lang.Class toJavaClass(C clazz)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |