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

The following examples show how to use proguard.classfile.VisitorAccepter#getVisitorInfo() . These examples are extracted from open source projects. 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
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
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
protected boolean isUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return visitorInfo != null                      &&
           visitorInfo instanceof ShortestUsageMark &&
           ((ShortestUsageMark)visitorInfo).isCertain();
}
 
Example 4
protected boolean shouldBeMarkedAsPossiblyUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return visitorInfo == null                         ||
           !(visitorInfo instanceof ShortestUsageMark) ||
           (!((ShortestUsageMark)visitorInfo).isCertain() &&
            currentUsageMark.isShorter((ShortestUsageMark)visitorInfo));
}
 
Example 5
protected boolean isPossiblyUsed(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return visitorInfo != null                      &&
           visitorInfo instanceof ShortestUsageMark &&
           !((ShortestUsageMark)visitorInfo).isCertain();
}
 
Example 6
/**
 * Returns whether the given visitor accepter should still be marked as
 * being used.
 */
protected boolean shouldBeMarkedAsUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() != USED;
}
 
Example 7
/**
 * Returns whether the given visitor accepter has been marked as being used.
 */
protected boolean isUsed(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == USED;
}
 
Example 8
/**
 * 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
/**
 * 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
protected ShortestUsageMark getShortestUsageMark(VisitorAccepter visitorAccepter)
{
    Object visitorInfo = visitorAccepter.getVisitorInfo();

    return (ShortestUsageMark)visitorInfo;
}
 
Example 11
private String visitorInfo(VisitorAccepter visitorAccepter)
{
    return visitorAccepter.getVisitorInfo() == null ? "-" : "+";
}
 
Example 12
/**
 * 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
/**
 * 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
/**
 * 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;
}