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 NameFactory
public String getAnnotationName(Key<?> key)
getAnnotationName
in interface NameFactory
public String getClassName(Key<?> key)
getClassName
in interface NameFactory
public String getInstanceName(Object instance)
getInstanceName
in interface NameFactory
public 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 NameFactory
protected String getFileString(StackTraceElement stackTraceElement)
Copyright © 2006-2015 Google, Inc.. All Rights Reserved.