Type byteArrayType = state.arrayTypeForType(state.getSymtab().byteType); Type intType = state.getSymtab().intType; MethodSymbol multiByteReadMethod =
Type byteArrayType = state.arrayTypeForType(state.getSymtab().byteType); Type intType = state.getSymtab().intType; MethodSymbol multiByteReadMethod =
@Override public Description matchMethodInvocation( MethodInvocationTree methodInvocationTree, VisitorState state) { if (!MATCHER.matches(methodInvocationTree, state)) { return Description.NO_MATCH; } if (methodInvocationTree.getArguments().size() % 2 == 0) { return Description.NO_MATCH; } JCMethodInvocation methodInvocation = (JCMethodInvocation) methodInvocationTree; List<JCExpression> arguments = methodInvocation.getArguments(); Type typeVargs = methodInvocation.varargsElement; if (typeVargs == null) { return Description.NO_MATCH; } Type typeVarargsArr = state.arrayTypeForType(typeVargs); Type lastArgType = ASTHelpers.getType(Iterables.getLast(arguments)); if (typeVarargsArr.equals(lastArgType)) { return Description.NO_MATCH; } return describeMatch(methodInvocationTree); } }