jill/src/main/java/io/github/agentsoz/jill/core/ProgramLoader.java
private static boolean processPlansForGoal(GoalType gtype, String[] plans) {
    for (int j = 0; j < plans.length; j++) {
      // Load the Plan class
      Class<?> pclass = loadClass(plans[j], Plan.class);
      if (pclass == null) {
        return false;
      }
      // Found the plan class, so add this plan to the catalog of known plan types
      logger.info("Found Plan " + pclass.getName() + " that handles Goal " + gtype.getName());
      PlanType ptype = new PlanType(pclass.getName());
      ptype.setPlanClass(pclass);
      GlobalState.planTypes.push(ptype);
      // Set up the parent/child links between them (makings of a goal-plan tree)
      ptype.addParent((byte) gtype.getId());
      gtype.addChild((byte) ptype.getId());
    }
    return true;
  }
private static boolean processPlansForGoal(GoalType gtype, String[] plans) {
    for (int j = 0; j < plans.length; j++) {
      // Load the Plan class
      Class<?> pclass = loadClass(plans[j], Plan.class);
      if (pclass == null) {
        return false;
      }
      // Found the plan class, so add this plan to the catalog of known plan types
      logger.info("Found Plan " + pclass.getName() + " that handles Goal " + gtype.getName());
      PlanType ptype = new PlanType(pclass.getName());
      ptype.setPlanClass(pclass);
      GlobalState.planTypes.push(ptype);
      // Set up the parent/child links between them (makings of a goal-plan tree)
      ptype.addParent((byte) gtype.getId());
      gtype.addChild((byte) ptype.getId());
    }
    return true;
  }
private static boolean processPlansForGoal ( GoalType gtype , String [ ] plans ) { for ( int j = 0 ; j < plans . length ; j ++ ) { // Load the Plan class Class < ? > pclass = loadClass ( plans [ j ] , Plan . class ) ; if ( pclass == null ) { return false ; } // Found the plan class, so add this plan to the catalog of known plan types logger . info ( "Found Plan " + pclass . getName ( ) + " that handles Goal " + gtype . getName ( ) ) ; PlanType ptype = new PlanType ( pclass . getName ( ) ) ; ptype . setPlanClass ( pclass ) ; GlobalState . planTypes . push ( ptype ) ; // Set up the parent/child links between them (makings of a goal-plan tree) ptype . addParent ( ( byte ) gtype . getId ( ) ) ; gtype . addChild ( ( byte ) ptype . getId ( ) ) ; } return true ; }
Loads the given plan classes and sets up parent-child links with the given goal type.

@param gtype the goal for which the list of plans is provided
@param plans list of plans to be loaded
@return true if successful, false otherwise
Loads the given plan classes and sets up parent - child links with the given goal type .