public void visitClassConstant(Clazz clazz, ClassConstant classConstant) { // Does the constant refer to a simple enum type? isSimpleEnum = isSimpleEnum(classConstant.referencedClass); }
public void visitClassConstant(Clazz clazz, ClassConstant classConstant) { // Does the constant refer to a simple enum type? isSimpleEnum = isSimpleEnum(classConstant.referencedClass); }
public void visitStringConstant(Clazz clazz, StringConstant stringConstant) { // Does the constant refer to a simple enum type? isSimpleEnum = isSimpleEnum(stringConstant.referencedClass); }
public void visitStringConstant(Clazz clazz, StringConstant stringConstant) { // Does the constant refer to a simple enum type? isSimpleEnum = isSimpleEnum(stringConstant.referencedClass); }
public void visitClassConstant(Clazz clazz, ClassConstant classConstant) { // Does the constant refer to a simple enum type? isSimpleEnum = isSimpleEnum(classConstant.referencedClass); }
public void visitStringConstant(Clazz clazz, StringConstant stringConstant) { // Does the constant refer to a simple enum type? isSimpleEnum = isSimpleEnum(stringConstant.referencedClass); }
public void visitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, String parameterType, Clazz referencedClass) { // Check if the parameter is passing a simple enum as a more general type. if (!ClassUtil.isInternalPrimitiveType(parameterType.charAt(0)) && !ClassUtil.isInternalArrayType(parameterType) && isSimpleEnum(referencedClass)) { // Replace any producers of null constants for this parameter. int stackEntryIndex = parameterSize - parameterOffset - 1; replaceNullStackEntryProducers(invocationClazz, invocationMethod, invocationCodeAttribute, invocationOffset, stackEntryIndex); } }
public void visitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, String parameterType, Clazz referencedClass) { // Check if the parameter is passing a simple enum as a more general type. if (!ClassUtil.isInternalPrimitiveType(parameterType.charAt(0)) && !ClassUtil.isInternalArrayType(parameterType) && isSimpleEnum(referencedClass)) { // Replace any producers of null constants for this parameter. int stackEntryIndex = parameterSize - parameterOffset - 1; replaceNullStackEntryProducers(invocationClazz, invocationMethod, invocationCodeAttribute, invocationOffset, stackEntryIndex); } }
/** * Returns whether the instruction at the given offset is popping a simple * enum type. This includes simple enum arrays. */ private boolean isPoppingSimpleEnumType(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()); }
/** * Returns whether the instruction at the given offset is popping a simple * enum type. This includes simple enum arrays. */ private boolean isPoppingSimpleEnumType(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()); }
/** * Returns whether the instruction at the given offset is popping a simple * enum type. This includes simple enum arrays. */ private boolean isPoppingSimpleEnumType(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()); }
/** * Returns whether the instruction at the given offset is pushing a simple * enum class. */ private boolean isPushingSimpleEnum(int offset) { ReferenceValue referenceValue = partialEvaluator.getStackAfter(offset).getTop(0).referenceValue(); Clazz referencedClass = referenceValue.getReferencedClass(); return isSimpleEnum(referencedClass) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a simple * enum class. */ private boolean isPoppingSimpleEnum(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is pushing a simple * enum class. */ private boolean isPushingSimpleEnum(int offset) { ReferenceValue referenceValue = partialEvaluator.getStackAfter(offset).getTop(0).referenceValue(); Clazz referencedClass = referenceValue.getReferencedClass(); return isSimpleEnum(referencedClass) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a simple * enum class. */ private boolean isPoppingSimpleEnum(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is pushing a simple * enum class. */ private boolean isPushingSimpleEnum(int offset) { ReferenceValue referenceValue = partialEvaluator.getStackAfter(offset).getTop(0).referenceValue(); Clazz referencedClass = referenceValue.getReferencedClass(); return isSimpleEnum(referencedClass) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a * one-dimensional simple enum array. */ private boolean isPoppingSimpleEnumArray(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && ClassUtil.internalArrayTypeDimensionCount(referenceValue.getType()) == 1; }
/** * Returns whether the instruction at the given offset is popping a simple * enum class. */ private boolean isPoppingSimpleEnum(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a * one-dimensional simple enum array. */ private boolean isPoppingSimpleEnumArray(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && ClassUtil.internalArrayTypeDimensionCount(referenceValue.getType()) == 1; }
/** * Returns whether the instruction at the given offset is popping a * one-dimensional simple enum array. */ private boolean isPoppingSimpleEnumArray(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && ClassUtil.internalArrayTypeDimensionCount(referenceValue.getType()) == 1; }