public static @Nullable ConstructorDef getSuperConstructor(ConstructorDef constr) {
   ClassDef c = constr.attrNearestClassDef();
   if (c == null) {
     return null;
   }
   ClassDef superClass = c.attrExtendedClass();
   if (superClass == null) {
     return null;
   }
   // call super constructor
   ConstructorDefs constructors = superClass.getConstructors();
   ConstructorDef superConstr = OverloadingResolver.resolveSuperCall(constructors, constr);
   return superConstr;
 }
Exemple #2
0
 public static WPos getErrorPos(ConstructorDef e) {
   WPos pos = e.getSource();
   return pos.withRightPos(pos.getLeftPos() + ("construct").length());
 }