jill/src/main/java/io/github/agentsoz/jill/core/ProgramLoader.java
private static String[] getGoalsFromPlanInfoAnnotation(Class<?> pclass) {
    Annotation annotation = pclass.getAnnotation(PlanInfo.class);
    PlanInfo pinfo = (PlanInfo) annotation;
    // A @PlanInfo is optional, and only present if this plan posts goals
    if (pinfo == null) {
      return null;
    }
    String[] postsGoals = pinfo.postsGoals();
    if (postsGoals.length == 0) {
      logger.error("Plan " + pclass.getName() + " has incomplete "
          + "@PlanInfo(postsGoals={\"package.GoalClass1\", \"package.GoalClass2\", ...})) "
          + "annotation");
    } else {
      logger.info("Plan " + pclass.getName() + " posts " + postsGoals.length + " goals");
    }
    return postsGoals;
  }
private static String[] getGoalsFromPlanInfoAnnotation(Class<?> pclass) {
    Annotation annotation = pclass.getAnnotation(PlanInfo.class);
    PlanInfo pinfo = (PlanInfo) annotation;
    // A @PlanInfo is optional, and only present if this plan posts goals
    if (pinfo == null) {
      return null;
    }
    String[] postsGoals = pinfo.postsGoals();
    if (postsGoals.length == 0) {
      logger.error("Plan " + pclass.getName() + " has incomplete "
          + "@PlanInfo(postsGoals={\"package.GoalClass1\", \"package.GoalClass2\", ...})) "
          + "annotation");
    } else {
      logger.info("Plan " + pclass.getName() + " posts " + postsGoals.length + " goals");
    }
    return postsGoals;
  }
private static String [ ] getGoalsFromPlanInfoAnnotation ( Class < ? > pclass ) { Annotation annotation = pclass . getAnnotation ( PlanInfo . class ) ; PlanInfo pinfo = ( PlanInfo ) annotation ; // A @PlanInfo is optional, and only present if this plan posts goals if ( pinfo == null ) { return null ; } String [ ] postsGoals = pinfo . postsGoals ( ) ; if ( postsGoals . length == 0 ) { logger . error ( "Plan " + pclass . getName ( ) + " has incomplete " + "@PlanInfo(postsGoals={\"package.GoalClass1\", \"package.GoalClass2\", ...})) " + "annotation" ) ; } else { logger . info ( "Plan " + pclass . getName ( ) + " posts " + postsGoals . length + " goals" ) ; } return postsGoals ; }
Gets the list of goals specified in the @PlanInfo annotation of the given plan class.

@param pclass the plan class containing the @PlanInfo annotation
@return list of goals specified in the @PlanInfo annotation; or null if the annotioan was not
present; or an empty array if the annotation has errors
Gets the list of goals specified in the @PlanInfo annotation of the given plan class .