Java Code Examples for proguard.optimize.info.NonPrivateMemberMarker#canBeMadePrivate()

The following examples show how to use proguard.optimize.info.NonPrivateMemberMarker#canBeMadePrivate() . 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
Source File: MemberPrivatizer.java    From proguard with GNU General Public License v2.0 6 votes vote down vote up
public void visitProgramField(ProgramClass programClass, ProgramField programField)
{
    // Is the field unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programField))
    {
        // Make the field private.
        programField.u2accessFlags =
            AccessUtil.replaceAccessFlags(programField.u2accessFlags,
                                          AccessConstants.PRIVATE);

        // Visit the field, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramField(programClass, programField);
        }
    }
}
 
Example 2
Source File: MemberPrivatizer.java    From proguard with GNU General Public License v2.0 6 votes vote down vote up
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    // Is the method unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programMethod))
    {
        // Make the method private and no longer final.
        programMethod.u2accessFlags =
            AccessUtil.replaceAccessFlags(programMethod.u2accessFlags,
                                          AccessConstants.PRIVATE);

        // Visit the method, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramMethod(programClass, programMethod);
        }
    }
}
 
Example 3
Source File: MemberPrivatizer.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
public void visitProgramField(ProgramClass programClass, ProgramField programField)
{
    // Is the field unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programField))
    {
        // Make the field private.
        programField.u2accessFlags =
            AccessUtil.replaceAccessFlags(programField.u2accessFlags,
                                          ClassConstants.INTERNAL_ACC_PRIVATE);

        // Visit the field, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramField(programClass, programField);
        }
    }
}
 
Example 4
Source File: MemberPrivatizer.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    // Is the method unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programMethod))
    {
        // Make the method private.
        programMethod.u2accessFlags =
            AccessUtil.replaceAccessFlags(programMethod.u2accessFlags,
                                          ClassConstants.INTERNAL_ACC_PRIVATE);

        // Visit the method, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramMethod(programClass, programMethod);
        }
    }
}
 
Example 5
Source File: MemberPrivatizer.java    From proguard with GNU General Public License v2.0 6 votes vote down vote up
public void visitProgramField(ProgramClass programClass, ProgramField programField)
{
    // Is the field unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programField))
    {
        // Make the field private.
        programField.u2accessFlags =
            AccessUtil.replaceAccessFlags(programField.u2accessFlags,
                                          ClassConstants.ACC_PRIVATE);

        // Visit the field, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramField(programClass, programField);
        }
    }
}
 
Example 6
Source File: MemberPrivatizer.java    From proguard with GNU General Public License v2.0 6 votes vote down vote up
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    // Is the method unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programMethod))
    {
        // Make the method private and no longer final.
        programMethod.u2accessFlags =
            AccessUtil.replaceAccessFlags(programMethod.u2accessFlags,
                                          ClassConstants.ACC_PRIVATE);

        // Visit the method, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramMethod(programClass, programMethod);
        }
    }
}
 
Example 7
Source File: MemberPrivatizer.java    From bazel with Apache License 2.0 6 votes vote down vote up
public void visitProgramField(ProgramClass programClass, ProgramField programField)
{
    // Is the field unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programField))
    {
        // Make the field private.
        programField.u2accessFlags =
            AccessUtil.replaceAccessFlags(programField.u2accessFlags,
                                          ClassConstants.ACC_PRIVATE);

        // Visit the field, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramField(programClass, programField);
        }
    }
}
 
Example 8
Source File: MemberPrivatizer.java    From bazel with Apache License 2.0 6 votes vote down vote up
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
{
    // Is the method unmarked?
    if (NonPrivateMemberMarker.canBeMadePrivate(programMethod))
    {
        // Make the method private and no longer final.
        programMethod.u2accessFlags =
            AccessUtil.replaceAccessFlags(programMethod.u2accessFlags,
                                          ClassConstants.ACC_PRIVATE);

        // Visit the method, if required.
        if (extraMemberVisitor != null)
        {
            extraMemberVisitor.visitProgramMethod(programClass, programMethod);
        }
    }
}