Java Code Examples for proguard.classfile.VisitorAccepter#getVisitorInfo()

The following examples show how to use proguard.classfile.VisitorAccepter#getVisitorInfo() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShortestUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected void markAsUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    ShortestUsageMark shortestUsageMark =
        visitorInfo != null                           &&
        visitorInfo instanceof ShortestUsageMark &&
        !((ShortestUsageMark)visitorInfo).isCertain() &&
        !currentUsageMark.isShorter((ShortestUsageMark)visitorInfo) ?
            new ShortestUsageMark((ShortestUsageMark)visitorInfo, true):
            currentUsageMark;

    visitorAccepter.setVisitorInfo(shortestUsageMark);
}
 
Example 2
Source File: ShortestUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected boolean shouldBeMarkedAsUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return //!(visitorAccepter instanceof Clazz &&
           //  isCausedBy(currentUsageMark, (Clazz)visitorAccepter)) &&
           (visitorInfo == null                           ||
           !(visitorInfo instanceof ShortestUsageMark)   ||
           !((ShortestUsageMark)visitorInfo).isCertain() ||
           currentUsageMark.isShorter((ShortestUsageMark)visitorInfo));
}
 
Example 3
Source File: ShortestUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected boolean isUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return visitorInfo != null                      &&
           visitorInfo instanceof ShortestUsageMark &&
           ((ShortestUsageMark)visitorInfo).isCertain();
}
 
Example 4
Source File: ShortestUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected boolean shouldBeMarkedAsPossiblyUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return visitorInfo == null                         ||
           !(visitorInfo instanceof ShortestUsageMark) ||
           (!((ShortestUsageMark)visitorInfo).isCertain() &&
            currentUsageMark.isShorter((ShortestUsageMark)visitorInfo));
}
 
Example 5
Source File: ShortestUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
protected boolean isPossiblyUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return visitorInfo != null                      &&
           visitorInfo instanceof ShortestUsageMark &&
           !((ShortestUsageMark)visitorInfo).isCertain();
}
 
Example 6
Source File: UsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given visitor accepter should still be marked as
 * being used.
 */
protected boolean shouldBeMarkedAsUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() != USED;
}
 
Example 7
Source File: UsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given visitor accepter has been marked as being used.
 */
protected boolean isUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == USED;
}
 
Example 8
Source File: UsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given visitor accepter should still be marked as
 * possibly being used.
 */
protected boolean shouldBeMarkedAsPossiblyUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() != USED &&
           visitorAccepter.getVisitorInfo() != POSSIBLY_USED;
}
 
Example 9
Source File: UsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given visitor accepter has been marked as possibly
 * being used.
 */
protected boolean isPossiblyUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == POSSIBLY_USED;
}
 
Example 10
Source File: ShortestUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
protected ShortestUsageMark getShortestUsageMark(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return (ShortestUsageMark)visitorInfo;
}
 
Example 11
Source File: ClassPrinter.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
private String visitorInfo(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == null ? "-" : "+";
}
 
Example 12
Source File: Utf8UsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given VisitorAccepter has been marked as being used.
 * In this context, the VisitorAccepter will be a Utf8Constant object.
 */
static boolean isUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == USED;
}
 
Example 13
Source File: NameAndTypeUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given VisitorAccepter has been marked as being used.
 * In this context, the VisitorAccepter will be a NameAndTypeConstant object.
 */
static boolean isUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == USED;
}
 
Example 14
Source File: AttributeUsageMarker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
/**
 * Returns whether the given VisitorAccepter has been marked as being used.
 * In this context, the VisitorAccepter will be an Attribute object.
 */
static boolean isUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == USED;
}