1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc
.squirreljme
.plugin
.multivm
;
12 import cc
.squirreljme
.plugin
.multivm
.ident
.SourceTargetClassifier
;
14 import java
.nio
.file
.Path
;
15 import java
.util
.Collection
;
16 import java
.util
.LinkedHashSet
;
17 import java
.util
.concurrent
.Callable
;
20 * Returns the inputs for the ROM.
24 public class VMRomInputs
25 implements Callable
<Iterable
<Path
>>
27 /** The task to generate for. */
28 protected final VMRomTask task
;
30 /** The classifier used. */
31 protected final SourceTargetClassifier classifier
;
34 * Initializes the handler.
36 * @param __task The task to create for.
37 * @param __classifier The classifier used.
38 * @throws NullPointerException On null arguments.
41 public VMRomInputs(VMRomTask __task
,
42 SourceTargetClassifier __classifier
)
43 throws NullPointerException
45 if (__task
== null || __classifier
== null)
46 throw new NullPointerException("NARG");
49 this.classifier
= __classifier
;
57 public Iterable
<Path
> call()
59 // All the inputs for the ROM are the outputs of all the library tasks
60 Collection
<Path
> rv
= new LinkedHashSet
<>();
61 for (VMLibraryTask task
: VMRomDependencies
.libraries(this.task
,
63 for (File f
: task
.getOutputs().getFiles().getFiles())