use of kalang.ast.ExprStmt in project kalang by kasonyang.
the class AstUtil method isConstructorCallStatement.
public static boolean isConstructorCallStatement(Statement stmt) {
try {
ExprStmt exprStmt = (ExprStmt) stmt;
InvocationExpr invExpr = (InvocationExpr) exprStmt.getExpr();
ExecutableDescriptor method = invExpr.getMethod();
return method.getName().equals("<init>") && !Modifier.isStatic(method.getModifier());
} catch (ClassCastException ex) {
return false;
}
}
Aggregations