private boolean methodNeedsReplacement(MethodNode m) { // no method found, we need to replace if (m == null) return true; // method is in current class, nothing to be done if (m.getDeclaringClass() == this.getClassNode()) return false; // do not overwrite final if (isFinal(m.getModifiers())) return false; return true; }
public void visitConstructorCallExpression(ConstructorCallExpression call) { ClassNode callType = call.getType(); if (callType.isEnum() && !callType.equals(verifier.getClassNode())) { throw new RuntimeParserException("Enum constructor calls are only allowed inside the enum class", call); } }
private boolean methodNeedsReplacement(MethodNode m) { // no method found, we need to replace if (m == null) return true; // method is in current class, nothing to be done if (m.getDeclaringClass() == this.getClassNode()) return false; // do not overwrite final if ((m.getModifiers() & ACC_FINAL) != 0) return false; return true; }
private boolean methodNeedsReplacement(MethodNode m) { // no method found, we need to replace if (m==null) return true; // method is in current class, nothing to be done if (m.getDeclaringClass()==this.getClassNode()) return false; // do not overwrite final if ((m.getModifiers()&ACC_FINAL)!=0) return false; return true; }
private boolean methodNeedsReplacement(MethodNode m) { // no method found, we need to replace if (m==null) return true; // method is in current class, nothing to be done if (m.getDeclaringClass()==this.getClassNode()) return false; // do not overwrite final if ((m.getModifiers()&ACC_FINAL)!=0) return false; return true; }
private boolean methodNeedsReplacement(MethodNode m) { // no method found, we need to replace if (m==null) return true; // method is in current class, nothing to be done if (m.getDeclaringClass()==this.getClassNode()) return false; // do not overwrite final if ((m.getModifiers()&ACC_FINAL)!=0) return false; return true; }
public void visitConstructorCallExpression(ConstructorCallExpression call) { ClassNode callType = call.getType(); if (callType.isEnum() && !callType.equals(verifier.getClassNode())) { throw new RuntimeParserException("Enum constructor calls are only allowed inside the enum class", call); } }