/** * Checks if the method could be a lambda. Notice this is a best-check, * since once compiled lambda methods are not univocally distinguishable. * * @param m The method to check if it's a lambda * @return True if this could be a lambda, false otherwise */ public static boolean couldBeLambda(final XMethod m) { return m.isPrivate() && m.isSynthetic(); }
private boolean isUnconditionalThrower(XMethod xMethod) { return xMethod.isUnconditionalThrower() && !xMethod.isUnsupported() && !xMethod.isSynthetic(); }
if (o instanceof XMethod) { m = (XMethod) o; isSyntheticMethod = m.isSynthetic(); kind = Target.METHOD; className = m.getClassName(); m = ((XMethodParameter) o).getMethod(); isSyntheticMethod = m.isSynthetic(); className = m.getClassName(); kind = Target.PARAMETER;
System.out.println("CEW: checking " + xmethod.toString()); if (xmethod.isSynthetic()) { if (DEBUG) { System.out.println("Skipping synthetic method " + xmethod.toString());
for (XMethod m : methods) { if (m.isStatic() && !m.isSynthetic()) { staticCount++; } else if (!Const.CONSTRUCTOR_NAME.equals(m.getName()) || !"()V".equals(m.getSignature())) {
@Override public void visit(Code obj) { uselessVoidCandidate = !classInit && !constructor && !getXMethod().isSynthetic() && Type.getReturnType(getMethodSig()) == Type.VOID; byte[] code = obj.getCode(); if(code.length == 4 && (code[0] & 0xFF) == Const.GETSTATIC && (code[3] & 0xFF) == Const.ARETURN) {
TypeQualifierValue<?> typeQualifierValue, boolean stopAtMethodScope) { if (xmethod.isSynthetic())
@Override public ValueRangeAnalysis analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor) throws CheckedAnalysisException { XMethod xMethod = XFactory.createXMethod(descriptor); if (xMethod.isNative() || xMethod.isSynthetic() || xMethod.isAbstract()) { return null;
&& !xMethod.isSynthetic(); if (isUnconditionalThrower) { foundThrower = true;
getSigConstantOperand(), false); if (invokedMethod.isResolved() && invokedMethod.getClassName().equals(getDottedClassConstantOperand()) || invokedMethod.isSynthetic()) { return;
if (xmethod.isSynthetic()) { return;
private boolean isUnconditionalThrower(XMethod xMethod) { return xMethod.isUnconditionalThrower() && !xMethod.isUnsupported() && !xMethod.isSynthetic(); }
/** * Add a class annotation and a method annotation for the class and method * which the given visitor is currently visiting. * * @param visitor * the BetterVisitor * @return this object */ @Nonnull public BugInstance addClassAndMethod(PreorderVisitor visitor) { addClass(visitor); XMethod m = visitor.getXMethod(); addMethod(visitor); if (m.isSynthetic()) { foundInSyntheticMethod(); } return this; }
if (o instanceof XMethod) { m = (XMethod) o; isSyntheticMethod = m.isSynthetic(); kind = Target.METHOD; className = m.getClassName(); m = ((XMethodParameter) o).getMethod(); isSyntheticMethod = m.isSynthetic(); className = m.getClassName(); kind = Target.PARAMETER;
System.out.println("CEW: checking " + xmethod.toString()); if (xmethod.isSynthetic()) { if (DEBUG) { System.out.println("Skipping synthetic method " + xmethod.toString());
for (XMethod m : methods) { if (m.isStatic() && !m.isSynthetic()) { staticCount++; } else if (!"<init>".equals(m.getName()) || !"()V".equals(m.getSignature())) {
TypeQualifierValue<?> typeQualifierValue, boolean stopAtMethodScope) { if (xmethod.isSynthetic())
@Override public void visit(Code obj) { uselessVoidCandidate = !classInit && !constructor && !getXMethod().isSynthetic() && Type.getReturnType(getMethodSig()) == Type.VOID; byte[] code = obj.getCode(); if(code.length == 4 && (code[0] & 0xFF) == GETSTATIC && (code[3] & 0xFF) == ARETURN) {
getSigConstantOperand(), false); if (invokedMethod.isResolved() && invokedMethod.getClassName().equals(getDottedClassConstantOperand()) || invokedMethod.isSynthetic()) { return;
&& !xMethod.isSynthetic(); if (isUnconditionalThrower) { foundThrower = true;