public class

ShortNameFactory

extends Object
implements NameFactory
java.lang.Object
   ↳ com.google.inject.grapher.ShortNameFactory

Class Overview

Reasonable implementation for NameFactory. Mostly takes various toString()s and strips package names out of them so that they'll fit on the graph.

Summary

Public Constructors
ShortNameFactory()
Public Methods
String getAnnotationName(Key<?> key)
String getClassName(Key<?> key)
String getInstanceName(Object instance)
String getMemberName(Member member)
String getSourceName(Object source)
Returns a name for a Guice "source" object.
Protected Methods
String getFileString(StackTraceElement stackTraceElement)
String getMethodString(Method method)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.inject.grapher.NameFactory

Public Constructors

public ShortNameFactory ()

Public Methods

public String getAnnotationName (Key<?> key)

public String getClassName (Key<?> key)

public String getInstanceName (Object instance)

public String getMemberName (Member member)

public String getSourceName (Object source)

Returns a name for a Guice "source" object. This will typically be either a StackTraceElement for when the binding is made to the instance, or a Method when a provider method is used.

Protected Methods

protected String getFileString (StackTraceElement stackTraceElement)

protected String getMethodString (Method method)