当前位置: 首页>>代码示例>>Java>>正文


Java MethodLinker类代码示例

本文整理汇总了Java中proguard.classfile.util.MethodLinker的典型用法代码示例。如果您正苦于以下问题:Java MethodLinker类的具体用法?Java MethodLinker怎么用?Java MethodLinker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MethodLinker类属于proguard.classfile.util包,在下文中一共展示了MethodLinker类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: markNoSideEffects

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
private static void markNoSideEffects(Method method)
{
    MethodOptimizationInfo info = MethodOptimizationInfo.getMethodOptimizationInfo(method);
    if (info != null)
    {
        info.setNoSideEffects();
    }
    else
    {
        MethodLinker.lastMember(method).setVisitorInfo(KEPT_BUT_NO_SIDE_EFFECTS);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:13,代码来源:NoSideEffectMethodMarker.java

示例2: hasNoSideEffects

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static boolean hasNoSideEffects(Method method)
{
    if (MethodLinker.lastVisitorAccepter(method).getVisitorInfo() == KEPT_BUT_NO_SIDE_EFFECTS)
    {
        return true;
    }

    MethodOptimizationInfo info = MethodOptimizationInfo.getMethodOptimizationInfo(method);
    return info != null &&
           info.hasNoSideEffects();
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:12,代码来源:NoSideEffectMethodMarker.java

示例3: getMethodOptimizationInfo

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static MethodOptimizationInfo getMethodOptimizationInfo(Method method)
{
    Object visitorInfo = MethodLinker.lastMember(method).getVisitorInfo();

    return visitorInfo instanceof MethodOptimizationInfo ?
        (MethodOptimizationInfo)visitorInfo :
        null;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:9,代码来源:MethodOptimizationInfo.java

示例4: setFixedNewMemberName

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:20,代码来源:MemberObfuscator.java

示例5: hasFixedNewMemberName

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
/**
 * Returns whether the new name of the given class member is fixed.
 * @param member the class member.
 * @return whether its new name is fixed.
 */
static boolean hasFixedNewMemberName(Member member)
{
    VisitorAccepter lastVisitorAccepter = MethodLinker.lastVisitorAccepter(member);

    return lastVisitorAccepter instanceof LibraryMember ||
           lastVisitorAccepter instanceof MyFixedName;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:13,代码来源:MemberObfuscator.java

示例6: isKept

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static boolean isKept(VisitorAccepter visitorAccepter)
{
    // We're also checking for the constant in NoSideEffectMethodMarker,
    // to keep things simple.
    Object visitorInfo =
        MethodLinker.lastVisitorAccepter(visitorAccepter).getVisitorInfo();

    return visitorInfo == KEPT ||
           visitorInfo == NoSideEffectMethodMarker.KEPT_BUT_NO_SIDE_EFFECTS;
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:11,代码来源:KeepMarker.java

示例7: setMethodOptimizationInfo

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static void setMethodOptimizationInfo(Clazz clazz, Method method)
{
    MethodLinker.lastMember(method).setVisitorInfo(new MethodOptimizationInfo(clazz, method));
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:MethodOptimizationInfo.java

示例8: visitProgramMethod

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    markAsKept(MethodLinker.lastMember(programMethod));
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:KeepMarker.java

示例9: visitLibraryMethod

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
{
    markAsKept(MethodLinker.lastMember(libraryMethod));
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:KeepMarker.java

示例10: isKept

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static boolean isKept(VisitorAccepter visitorAccepter)
{
    return MethodLinker.lastVisitorAccepter(visitorAccepter).getVisitorInfo() == KEPT;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:KeepMarker.java

示例11: setNewMemberName

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
/**
 * Assigns a new name to the given class member.
 * @param member the class member.
 * @param name   the new name.
 */
static void setNewMemberName(Member member, String name)
{
    MethodLinker.lastVisitorAccepter(member).setVisitorInfo(name);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:10,代码来源:MemberObfuscator.java

示例12: newMemberName

import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
/**
 * Retrieves the new name of the given class member.
 * @param member the class member.
 * @return the class member's new name, or <code>null</code> if it doesn't
 *         have one yet.
 */
static String newMemberName(Member member)
{
    return (String) MethodLinker.lastVisitorAccepter(member).getVisitorInfo();
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:11,代码来源:MemberObfuscator.java


注:本文中的proguard.classfile.util.MethodLinker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。