public void target(String targetClassVersion) { configuration.targetClassVersion = ClassUtil.internalClassVersion(targetClassVersion); }
public void visitClassConstant(Clazz clazz, ClassConstant classConstant) { ClassConstant classPatternConstant = (ClassConstant)patternConstant; // Check the class name. matchingConstant = matchingConstantIndices(clazz, classConstant.u2nameIndex, classPatternConstant.u2nameIndex); }
public int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { int[] matchedJumpOffsets = new int[jumpOffsets.length]; for (int index = 0; index < jumpOffsets.length; index++) { matchedJumpOffsets[index] = matchedBranchOffset(offset, jumpOffsets[index]); } return matchedJumpOffsets; }
public void flattenpackagehierarchy(String flattenPackageHierarchy) { configuration.flattenPackageHierarchy = ClassUtil.internalClassName(flattenPackageHierarchy); }
/** * Converts an internal method descriptor into an external method return type. * @param internalMethodDescriptor the internal method descriptor, * e.g. "<code>(II)Z</code>". * @return the external method return type, * e.g. "<code>boolean</code>". */ public static String externalMethodReturnType(String internalMethodDescriptor) { return externalType(internalMethodReturnType(internalMethodDescriptor)); }
public void visitStringConstant(Clazz clazz, StringConstant stringConstant) { // Fill out the String class. stringConstant.javaLangStringClass = findClass(clazz, ClassConstants.NAME_JAVA_LANG_STRING); }
/** * Converts internal method access flags into an external access description. * @param accessFlags the method access flags. * @return the external method access description, * e.g. "<code>public synchronized </code>". */ public static String externalMethodAccessFlags(int accessFlags) { return externalMethodAccessFlags(accessFlags, ""); }
/** * Visits any type of AnnotationsAttribute of a class. */ public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute) { visitAnyAttribute(clazz, annotationsAttribute); }
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue) { visitAnyElementValue(clazz, annotation, arrayElementValue); } }
public int[] matchedArguments(int[] arguments) { int[] matchedArguments = new int[arguments.length]; for (int index = 0; index < arguments.length; index++) { matchedArguments[index] = matchedArgument(arguments[index]); } return matchedArguments; }
/** * Returns the internal type of a given class name. * @param internalClassName the internal class name, * e.g. "<code>java/lang/Object</code>". * @return the internal type, * e.g. "<code>Ljava/lang/Object;</code>". */ public static String internalTypeFromClassName(String internalClassName) { return internalArrayTypeFromClassName(internalClassName, 0); }
/** * Converts internal class access flags into an external access description. * @param accessFlags the class access flags. * @return the external class access description, * e.g. "<code>public final </code>". */ public static String externalClassAccessFlags(int accessFlags) { return externalClassAccessFlags(accessFlags, ""); }
/** * Converts internal field access flags into an external access description. * @param accessFlags the field access flags. * @return the external field access description, * e.g. "<code>public volatile </code>". */ public static String externalFieldAccessFlags(int accessFlags) { return externalFieldAccessFlags(accessFlags, ""); }
/** * Visits the given RuntimeVisibleAnnotationsAttribute of any type of class member. */ public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Member member, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute) { visitRuntimeVisibleAnnotationsAttribute(clazz, runtimeVisibleAnnotationsAttribute); }
/** * Visits either type of SwitchInstruction. */ public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction) { visitAnyInstruction(clazz, method, codeAttribute, offset, switchInstruction); }
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { visitParameters(programClass, programMethod, programMethod.referencedClasses); }
/** * @deprecated Use the repackageclasses attribute instead. */ public void setDefaultpackage(String defaultPackage) { configuration.repackageClasses = ClassUtil.internalClassName(defaultPackage); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { NameAndTypeConstant typePatternConstant = (NameAndTypeConstant)patternConstant; // Check the name and the descriptor. matchingConstant = matchingConstantIndices(clazz, nameAndTypeConstant.u2nameIndex, typePatternConstant.u2nameIndex) && matchingConstantIndices(clazz, nameAndTypeConstant.u2descriptorIndex, typePatternConstant.u2descriptorIndex); }
public void visitMethodHandleConstant(Clazz clazz, MethodHandleConstant methodHandleConstant) { // Fill out the MethodHandle class. methodHandleConstant.javaLangInvokeMethodHandleClass = findClass(clazz, ClassConstants.NAME_JAVA_LANG_INVOKE_METHOD_HANDLE); }
public void visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant) { MethodTypeConstant typePatternConstant = (MethodTypeConstant)patternConstant; // Check the descriptor. matchingConstant = matchingConstantIndices(clazz, methodTypeConstant.u2descriptorIndex, typePatternConstant.u2descriptorIndex); }