/** * Creates a {@link AbstractGoal} for the given {@link GoalType} and (@link GoalClient}. * @param _type */ public static AbstractGoal create(@NotNull GoalType _type, @NotNull GoalClient _client) throws IllegalStateException, IllegalArgumentException { final AbstractGoal goal = GoalFactory.create(_type); goal.setGoalClient(_client); return goal; } }
goal = GoalFactory.create(goalType, GoalClient.CLI); goal.executeSync();
try { final GoalType gt = GoalType.parseGoal(g); this.addGoal(GoalFactory.create(gt, this.getGoalClient()));