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

The following examples show how to use proguard.classfile.VisitorAccepter#setVisitorInfo() . 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
/**
 * Assigns a fixed new name to the given class member.
 * @param member the class member.
 * @param name   the new name.
 */
static void setFixedNewMemberName(Member member, String name)
{
    VisitorAccepter lastVisitorAccepter = MethodLinker.lastVisitorAccepter(member);

    if (!(lastVisitorAccepter instanceof LibraryMember) &&
        !(lastVisitorAccepter instanceof MyFixedName))
    {
        lastVisitorAccepter.setVisitorInfo(new MyFixedName(name));
    }
    else
    {
        lastVisitorAccepter.setVisitorInfo(name);
    }
}
 
Example 3
/**
 * Marks the given visitor accepter as being used.
 */
protected void markAsUsed(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(USED);
}
 
Example 4
/**
 * Marks the given visitor accepter as possibly being used.
 */
protected void markAsPossiblyUsed(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(POSSIBLY_USED);
}
 
Example 5
/**
 * Clears any usage marks from the given visitor accepter.
 */
protected void markAsUnused(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(null);
}
 
Example 6
protected void markAsPossiblyUsed(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(new ShortestUsageMark(currentUsageMark, false));
}
 
Example 7
private void clean(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(null);
}
 
Example 8
private static void markAsKept(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(KEPT);
}
 
Example 9
/**
 * Marks the given VisitorAccepter as being used.
 * In this context, the VisitorAccepter will be a Utf8Constant object.
 */
private static void markAsUsed(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(USED);
}
 
Example 10
/**
 * Marks the given VisitorAccepter as being used.
 * In this context, the VisitorAccepter will be a NameAndTypeConstant object.
 */
private static void markAsUsed(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(USED);
}
 
Example 11
/**
 * Marks the given VisitorAccepter as being used (or useful).
 * In this context, the VisitorAccepter will be an Attribute object.
 */
private static void markAsUsed(VisitorAccepter visitorAccepter)
{
    visitorAccepter.setVisitorInfo(USED);
}