public CSourceMethod checkInterface(CClassContext context) throws PositionedError {

    try {
      context.setAllowsDependentTypes(false);

      CType[] parameterTypes = new CType[parameters.length];

      returnType = returnType.checkType(context);
      for (int i = 0; i < parameterTypes.length; i++) {
        parameterTypes[i] = parameters[i].checkInterface(context);
      }

      for (int i = 0; i < exceptions.length; i++) {
        exceptions[i] = (CReferenceType) exceptions[i].checkType(context);
      }

      setInterface(
          new CCjProceed(
              context.getCClass(), ident, returnType, parameters, parameterTypes, adviceName));

      return (CSourceMethod) getMethod();
    } catch (UnpositionedError cue) {
      throw cue.addPosition(getTokenReference());
    } finally {
      context.setAllowsDependentTypes(true);
    }
  }
예제 #2
0
 /**
  * Reports a trouble.
  *
  * @param trouble a description of the trouble to report.
  */
 public void reportTrouble(UnpositionedError trouble) {
   Log.error(trouble.getMessage());
   errorFound = true;
 }