本文整理汇总了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);
}
}
示例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();
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例7: setMethodOptimizationInfo
import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static void setMethodOptimizationInfo(Clazz clazz, Method method)
{
MethodLinker.lastMember(method).setVisitorInfo(new MethodOptimizationInfo(clazz, method));
}
示例8: visitProgramMethod
import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
markAsKept(MethodLinker.lastMember(programMethod));
}
示例9: visitLibraryMethod
import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
{
markAsKept(MethodLinker.lastMember(libraryMethod));
}
示例10: isKept
import proguard.classfile.util.MethodLinker; //导入依赖的package包/类
public static boolean isKept(VisitorAccepter visitorAccepter)
{
return MethodLinker.lastVisitorAccepter(visitorAccepter).getVisitorInfo() == KEPT;
}
示例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);
}
示例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();
}