Package com.google.inject.grapher
Class ShortNameFactory
java.lang.Object
com.google.inject.grapher.ShortNameFactory
- All Implemented Interfaces:
NameFactory
Reasonable implementation for
NameFactory
. Mostly takes various
Object.toString()
s and strips package names out of them so that
they'll fit on the graph.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotationName
(Key<?> key) getClassName
(Key<?> key) protected String
getFileString
(StackTraceElement stackTraceElement) getInstanceName
(Object instance) getMemberName
(Member member) protected String
getMethodString
(Method method) getSourceName
(Object source) Returns a name for a Guice "source" object.
-
Constructor Details
-
ShortNameFactory
public ShortNameFactory()
-
-
Method Details
-
getMemberName
- Specified by:
getMemberName
in interfaceNameFactory
-
getAnnotationName
- Specified by:
getAnnotationName
in interfaceNameFactory
-
getClassName
- Specified by:
getClassName
in interfaceNameFactory
-
getInstanceName
- Specified by:
getInstanceName
in interfaceNameFactory
-
getSourceName
Returns a name for a Guice "source" object. This will typically be either aStackTraceElement
for when the binding is made to the instance, or aMethod
when a provider method is used.- Specified by:
getSourceName
in interfaceNameFactory
-
getFileString
-
getMethodString
-