Java Code Examples for proguard.classfile.ClassConstants#INTERNAL_ACC_PROTECTED
The following examples show how to use
proguard.classfile.ClassConstants#INTERNAL_ACC_PROTECTED .
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: AccessMethodMarker.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
public void visitAnyMember(Clazz clazz, Member member) { int accessFlags = member.getAccessFlags(); if ((accessFlags & ClassConstants.INTERNAL_ACC_PRIVATE) != 0) { setAccessesPrivateCode(invokingMethod); } else if ((accessFlags & ClassConstants.INTERNAL_ACC_PROTECTED) != 0) { setAccessesProtectedCode(invokingMethod); } else if ((accessFlags & ClassConstants.INTERNAL_ACC_PUBLIC) == 0) { setAccessesPackageCode(invokingMethod); } }
Example 2
Source File: AccessUtil.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
/** * Returns the corresponding access level of the given access flags. * @param accessFlags the internal access flags. * @return the corresponding access level: <code>PRIVATE</code>, * <code>PACKAGE_VISIBLE</code>, <code>PROTECTED</code>, or * <code>PUBLIC</code>. */ public static int accessLevel(int accessFlags) { switch (accessFlags & ACCESS_MASK) { case ClassConstants.INTERNAL_ACC_PRIVATE: return PRIVATE; default: return PACKAGE_VISIBLE; case ClassConstants.INTERNAL_ACC_PROTECTED: return PROTECTED; case ClassConstants.INTERNAL_ACC_PUBLIC: return PUBLIC; } }
Example 3
Source File: AccessUtil.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
/** * Returns the corresponding access flags of the given access level. * @param accessLevel the access level: <code>PRIVATE</code>, * <code>PACKAGE_VISIBLE</code>, <code>PROTECTED</code>, * or <code>PUBLIC</code>. * @return the corresponding internal access flags, the internal access * flags as a logical bit mask of <code>INTERNAL_ACC_PRIVATE</code>, * <code>INTERNAL_ACC_PROTECTED</code>, and * <code>INTERNAL_ACC_PUBLIC</code>. */ public static int accessFlags(int accessLevel) { switch (accessLevel) { case PRIVATE: return ClassConstants.INTERNAL_ACC_PRIVATE; default: return 0; case PROTECTED: return ClassConstants.INTERNAL_ACC_PROTECTED; case PUBLIC: return ClassConstants.INTERNAL_ACC_PUBLIC; } }
Example 4
Source File: ClassUtil.java From java-n-IDE-for-Android with Apache License 2.0 | 4 votes |
/** * Converts internal class access flags into an external access description. * @param accessFlags the class access flags. * @param prefix a prefix that is added to each access modifier. * @return the external class access description, * e.g. "<code>public final </code>". */ public static String externalClassAccessFlags(int accessFlags, String prefix) { if (accessFlags == 0) { return EMPTY_STRING; } StringBuffer string = new StringBuffer(50); if ((accessFlags & ClassConstants.INTERNAL_ACC_PUBLIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PUBLIC).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_PRIVATE) != 0) { // Only in InnerClasses attributes. string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PRIVATE).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_PROTECTED) != 0) { // Only in InnerClasses attributes. string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PROTECTED).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_STATIC) != 0) { // Only in InnerClasses attributes. string.append(prefix).append(ClassConstants.EXTERNAL_ACC_STATIC).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_FINAL) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_FINAL).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_ANNOTATTION) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_ANNOTATION); } if ((accessFlags & ClassConstants.INTERNAL_ACC_INTERFACE) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_INTERFACE).append(' '); } else if ((accessFlags & ClassConstants.INTERNAL_ACC_ENUM) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_ENUM).append(' '); } else if ((accessFlags & ClassConstants.INTERNAL_ACC_ABSTRACT) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_ABSTRACT).append(' '); } else if ((accessFlags & ClassConstants.INTERNAL_ACC_SYNTHETIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_SYNTHETIC).append(' '); } return string.toString(); }
Example 5
Source File: ClassUtil.java From java-n-IDE-for-Android with Apache License 2.0 | 4 votes |
/** * Converts internal field access flags into an external access description. * @param accessFlags the field access flags. * @param prefix a prefix that is added to each access modifier. * @return the external field access description, * e.g. "<code>public volatile </code>". */ public static String externalFieldAccessFlags(int accessFlags, String prefix) { if (accessFlags == 0) { return EMPTY_STRING; } StringBuffer string = new StringBuffer(50); if ((accessFlags & ClassConstants.INTERNAL_ACC_PUBLIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PUBLIC).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_PRIVATE) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PRIVATE).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_PROTECTED) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PROTECTED).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_STATIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_STATIC).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_FINAL) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_FINAL).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_VOLATILE) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_VOLATILE).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_TRANSIENT) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_TRANSIENT).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_SYNTHETIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_SYNTHETIC).append(' '); } return string.toString(); }
Example 6
Source File: ClassUtil.java From java-n-IDE-for-Android with Apache License 2.0 | 4 votes |
/** * Converts internal method access flags into an external access description. * @param accessFlags the method access flags. * @param prefix a prefix that is added to each access modifier. * @return the external method access description, * e.g. "public synchronized ". */ public static String externalMethodAccessFlags(int accessFlags, String prefix) { if (accessFlags == 0) { return EMPTY_STRING; } StringBuffer string = new StringBuffer(50); if ((accessFlags & ClassConstants.INTERNAL_ACC_PUBLIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PUBLIC).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_PRIVATE) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PRIVATE).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_PROTECTED) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_PROTECTED).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_STATIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_STATIC).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_FINAL) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_FINAL).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_SYNCHRONIZED) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_SYNCHRONIZED).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_BRIDGE) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_BRIDGE).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_VARARGS) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_VARARGS).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_NATIVE) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_NATIVE).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_ABSTRACT) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_ABSTRACT).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_STRICT) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_STRICT).append(' '); } if ((accessFlags & ClassConstants.INTERNAL_ACC_SYNTHETIC) != 0) { string.append(prefix).append(ClassConstants.EXTERNAL_ACC_SYNTHETIC).append(' '); } return string.toString(); }