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


Java KeepMarker.isKept方法代码示例

本文整理汇总了Java中proguard.optimize.KeepMarker.isKept方法的典型用法代码示例。如果您正苦于以下问题:Java KeepMarker.isKept方法的具体用法?Java KeepMarker.isKept怎么用?Java KeepMarker.isKept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在proguard.optimize.KeepMarker的用法示例。


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

示例1: visitProgramClass

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramClass(ProgramClass programClass)
{
    // If the class is not final/interface/abstract,
    // and it is not being kept,
    // and it doesn't have any subclasses,
    // then make it final.
    if ((programClass.u2accessFlags & (ClassConstants.INTERNAL_ACC_FINAL     |
                                       ClassConstants.INTERNAL_ACC_INTERFACE |
                                       ClassConstants.INTERNAL_ACC_ABSTRACT)) == 0 &&
        !KeepMarker.isKept(programClass)                                           &&
        programClass.subClasses == null)
    {
        programClass.u2accessFlags |= ClassConstants.INTERNAL_ACC_FINAL;

        // Visit the class, if required.
        if (extraClassVisitor != null)
        {
            extraClassVisitor.visitProgramClass(programClass);
        }
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:22,代码来源:ClassFinalizer.java

示例2: visitProgramClass

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramClass(ProgramClass programClass)
{
    if (!KeepMarker.isKept(programClass))
    {
        notePrinter.print(referencingClass.getName(),
                          programClass.getName(),
                          "Note: the configuration keeps the entry point '" +
                          ClassUtil.externalClassName(referencingClass.getName()) +
                          " { " +
                          (isField ?
                               ClassUtil.externalFullFieldDescription(0,
                                                                      referencingMember.getName(referencingClass),
                                                                      referencingMember.getDescriptor(referencingClass)) :
                               ClassUtil.externalFullMethodDescription(referencingClass.getName(),
                                                                       0,
                                                                       referencingMember.getName(referencingClass),
                                                                       referencingMember.getDescriptor(referencingClass))) +
                          "; }', but not the descriptor class '" +
                          ClassUtil.externalClassName(programClass.getName()) +
                          "'");
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:23,代码来源:DescriptorKeepChecker.java

示例3: visitProgramClass

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramClass(ProgramClass programClass)
{
    // If the class is not final/interface/abstract,
    // and it is not being kept,
    // and it doesn't have any subclasses,
    // then make it final.
    if ((programClass.u2accessFlags & (ClassConstants.ACC_FINAL     |
                                       ClassConstants.ACC_INTERFACE |
                                       ClassConstants.ACC_ABSTRACT)) == 0 &&
        !KeepMarker.isKept(programClass)                                           &&
        programClass.subClasses == null)
    {
        programClass.u2accessFlags |= ClassConstants.ACC_FINAL;

        // Visit the class, if required.
        if (extraClassVisitor != null)
        {
            extraClassVisitor.visitProgramClass(programClass);
        }
    }
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:22,代码来源:ClassFinalizer.java

示例4: visitProgramField

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramField(ProgramClass programClass, ProgramField programField)
{
    if (!KeepMarker.isKept(programField))
    {
        FieldOptimizationInfo.setFieldOptimizationInfo(programClass,
                                                       programField);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:9,代码来源:MemberOptimizationInfoSetter.java

示例5: visitProgramMethod

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    if (!KeepMarker.isKept(programMethod))
    {
        MethodOptimizationInfo.setMethodOptimizationInfo(programClass,
                                                         programMethod);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:9,代码来源:MemberOptimizationInfoSetter.java

示例6: visitProgramClass

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramClass(ProgramClass programClass)
{
    if (!KeepMarker.isKept(programClass))
    {
        ClassOptimizationInfo.setClassOptimizationInfo(programClass);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:ClassOptimizationInfoSetter.java

示例7: visitProgramMethod

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    String name = programMethod.getName(programClass);

    // If the method is not already private/static/final/abstract,
    // and it is not a constructor,
    // and its class is final,
    //     or it is not being kept and it is not overridden,
    // then make it final.
    if ((programMethod.u2accessFlags & (ClassConstants.INTERNAL_ACC_PRIVATE |
                                        ClassConstants.INTERNAL_ACC_STATIC  |
                                        ClassConstants.INTERNAL_ACC_FINAL   |
                                        ClassConstants.INTERNAL_ACC_ABSTRACT)) == 0 &&
        !name.equals(ClassConstants.INTERNAL_METHOD_NAME_INIT)                      &&
        ((programClass.u2accessFlags & ClassConstants.INTERNAL_ACC_FINAL) != 0 ||
         (!KeepMarker.isKept(programMethod) &&
          (programClass.subClasses == null ||
           !memberFinder.isOverriden(programClass, programMethod)))))
    {
        programMethod.u2accessFlags |= ClassConstants.INTERNAL_ACC_FINAL;

        // Visit the method, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramMethod(programClass, programMethod);
        }
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:29,代码来源:MethodFinalizer.java

示例8: visitProgramMethod

import proguard.optimize.KeepMarker; //导入方法依赖的package包/类
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    String name = programMethod.getName(programClass);

    // If the method is not already private/static/final/abstract,
    // and it is not a constructor,
    // and its class is final,
    //     or it is not being kept and it is not overridden,
    // then make it final.
    if ((programMethod.u2accessFlags & (ClassConstants.ACC_PRIVATE |
                                        ClassConstants.ACC_STATIC  |
                                        ClassConstants.ACC_FINAL   |
                                        ClassConstants.ACC_ABSTRACT)) == 0 &&
        !name.equals(ClassConstants.METHOD_NAME_INIT)                      &&
        ((programClass.u2accessFlags & ClassConstants.ACC_FINAL) != 0 ||
         (!KeepMarker.isKept(programMethod) &&
          (programClass.subClasses == null ||
           !memberFinder.isOverriden(programClass, programMethod)))))
    {
        programMethod.u2accessFlags |= ClassConstants.ACC_FINAL;

        // Visit the method, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramMethod(programClass, programMethod);
        }
    }
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:29,代码来源:MethodFinalizer.java


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