private static String[] getGoalsFromAgentInfoAnnotation(Class<?> aclass) {
    // Find the goals that this agent has
    Annotation annotation = aclass.getAnnotation(AgentInfo.class);
    if (annotation == null) {
      logger.error("Agent " + aclass.getName() + " is missing the "
          + "@AgentInfo(hasGoals={\"package.GoalClass1, package.GoalClass2, ...\"}) " + knowsNothing
          + "about this agent's goals and plans.");
      return new String[0];
    }
    AgentInfo ainfo = (AgentInfo) annotation;
    String[] goals = ainfo.hasGoals();
    if (goals.length == 0) {
      logger.error("Agent " + aclass.getName()
          + " does not have any goals defined. Was expecting something like "
          + "@AgentInfo(hasGoals={\"package.GoalClass1, package.GoalClass2, ...\"}) " + knowsNothing
          + "about this agent's goals and plans.");
    }
    return goals;
  }
private static String[] getGoalsFromAgentInfoAnnotation(Class<?> aclass) {
    
    Annotation annotation = aclass.getAnnotation(AgentInfo.class);
    if (annotation == null) {
      logger.error("Agent " + aclass.getName() + " is missing the "
          + "@AgentInfo(hasGoals={\"package.GoalClass1, package.GoalClass2, ...\"}) " + knowsNothing
          + "about this agent's goals and plans.");
      return new String[0];
    }
    AgentInfo ainfo = (AgentInfo) annotation;
    String[] goals = ainfo.hasGoals();
    if (goals.length == 0) {
      logger.error("Agent " + aclass.getName()
          + " does not have any goals defined. Was expecting something like "
          + "@AgentInfo(hasGoals={\"package.GoalClass1, package.GoalClass2, ...\"}) " + knowsNothing
          + "about this agent's goals and plans.");
    }
    return goals;
  }
private static String [ ] getGoalsFromAgentInfoAnnotation ( Class < ? > aclass ) { // Find the goals that this agent has Annotation annotation = aclass . getAnnotation ( AgentInfo . class ) ; if ( annotation == null ) { logger . error ( "Agent " + aclass . getName ( ) + " is missing the " + "@AgentInfo(hasGoals={\"package.GoalClass1, package.GoalClass2, ...\"}) " + knowsNothing + "about this agent's goals and plans." ) ; return new String [ 0 ] ; } AgentInfo ainfo = ( AgentInfo ) annotation ; String [ ] goals = ainfo . hasGoals ( ) ; if ( goals . length == 0 ) { logger . error ( "Agent " + aclass . getName ( ) + " does not have any goals defined. Was expecting something like " + "@AgentInfo(hasGoals={\"package.GoalClass1, package.GoalClass2, ...\"}) " + knowsNothing + "about this agent's goals and plans." ) ; } return goals ; }
Gets the list of goals specified in the @AgentInfo annotation of the given agent class.

@param aclass the agent class containing the @AgentInfo annotation
@return list of goals specified in the @AgentInfo annotation, or an empty array if unsuccessful
Gets the list of goals specified in the @AgentInfo annotation of the given agent class .