public enum DependencyType extends java.lang.Enum<DependencyType>
A node is considered "reachable" if:
IF_CLASS_KEPT and at least one CLASS_IS_KEPT edge, or
SUPERINTERFACE_KEPT and at least one INTERFACE_IMPLEMENTED
edge.
The second case models the situation where a method implements an interface method. The only case when it should be kept is if the interface method is called somewhere (1) AND the containing class is used in some way (2). Otherwise the super-method can be removed from both the interface and the class (not 1) or the whole implementation class can be removed (not 2).
| Enum Constant and Description |
|---|
CLASS_IS_KEPT
Target member's owner class is kept.
|
IF_CLASS_KEPT
Target member should be kept, assuming its owner class is kept.
|
INTERFACE_IMPLEMENTED
Target interface is implemented (directly or indirectly) by a kept class, so it may need to
be kept if a superinterface is kept as well.
|
REQUIRED_CLASS_STRUCTURE
Target type is referenced in class declaration.
|
REQUIRED_CODE_REFERENCE
Target is referenced from an opcode.
|
REQUIRED_CODE_REFERENCE_REFLECTION
Target is referenced by name in reflection code.
|
REQUIRED_KEEP_RULES
Target is kept by keep rules.
|
SUPERINTERFACE_KEPT
Superinterface of the target interface is kept.
|
| Modifier and Type | Method and Description |
|---|---|
static DependencyType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DependencyType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DependencyType REQUIRED_CODE_REFERENCE
public static final DependencyType REQUIRED_CODE_REFERENCE_REFLECTION
public static final DependencyType REQUIRED_CLASS_STRUCTURE
public static final DependencyType REQUIRED_KEEP_RULES
public static final DependencyType IF_CLASS_KEPT
CLASS_IS_KEPTpublic static final DependencyType CLASS_IS_KEPT
IF_CLASS_KEPTpublic static final DependencyType SUPERINTERFACE_KEPT
INTERFACE_IMPLEMENTEDpublic static final DependencyType INTERFACE_IMPLEMENTED
SUPERINTERFACE_KEPTpublic static DependencyType[] values()
for (DependencyType c : DependencyType.values()) System.out.println(c);
public static DependencyType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null