public class ShortNameFactory extends Object implements NameFactory
NameFactory. Mostly takes various
Object.toString()s and strips package names out of them so that
they'll fit on the graph.| Constructor and Description |
|---|
ShortNameFactory() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAnnotationName(Key<?> key) |
String |
getClassName(Key<?> key) |
protected String |
getFileString(StackTraceElement stackTraceElement) |
String |
getInstanceName(Object instance) |
String |
getMemberName(Member member) |
protected String |
getMethodString(Method method) |
String |
getSourceName(Object source)
Returns a name for a Guice "source" object.
|
public String getMemberName(Member member)
getMemberName in interface NameFactorypublic String getAnnotationName(Key<?> key)
getAnnotationName in interface NameFactorypublic String getClassName(Key<?> key)
getClassName in interface NameFactorypublic String getInstanceName(Object instance)
getInstanceName in interface NameFactorypublic String getSourceName(Object source)
StackTraceElement for when the binding is made to the instance,
or a Method when a provider method is used.getSourceName in interface NameFactoryprotected String getFileString(StackTraceElement stackTraceElement)