public abstract class InjectionPlan<T> extends Object implements Traversable<InjectionPlan<?>>
Constructor and Description |
---|
InjectionPlan(Node node) |
Modifier and Type | Method and Description |
---|---|
Collection<InjectionPlan<?>> |
getChildren()
Get child elements of the injection plan tree.
|
Node |
getNode() |
abstract int |
getNumAlternatives() |
abstract boolean |
isAmbiguous() |
boolean |
isFeasible() |
abstract boolean |
isInjectable() |
String |
toCantInjectString()
Algorithm for generating cant inject string:
|
String |
toPrettyString() |
abstract String |
toShallowString() |
public InjectionPlan(Node node)
public Collection<InjectionPlan<?>> getChildren()
getChildren
in interface Traversable<InjectionPlan<?>>
public abstract int getNumAlternatives()
public boolean isFeasible()
public abstract boolean isAmbiguous()
public abstract boolean isInjectable()
public String toPrettyString()
public final String toCantInjectString()
For infeasible plans:
Some node types are "leaves":
For ambiguous plans:
We perform a depth first search of the ambiguous constructors, as above. We return the name of the first class that has multiple constructors that are feasible or ambiguous (as opposed to having a single constructor with an ambiguous argument, or a constructor with an infeasible argument and an ambiguous argument).
public abstract String toShallowString()
Copyright © 2016 The Apache Software Foundation. All rights reserved.