mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 10:44:47 +01:00
Add get/setProperty
This commit is contained in:
parent
bd6b2ef3c6
commit
53494d55be
@ -24,6 +24,7 @@ import java.io.OutputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@ -41,7 +42,9 @@ import de.inetsoftware.jwebassembly.text.TextModuleWriter;
|
||||
*/
|
||||
public class JWebAssembly {
|
||||
|
||||
private List<URL> classFiles = new ArrayList<>();
|
||||
private final List<URL> classFiles = new ArrayList<>();
|
||||
|
||||
private final HashMap<String, String> properties = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Create a instance.
|
||||
@ -73,6 +76,29 @@ public class JWebAssembly {
|
||||
classFiles.add( classFile );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set property to control the behavior of the compiler
|
||||
*
|
||||
* @param key
|
||||
* the key
|
||||
* @param value
|
||||
* the new value
|
||||
*/
|
||||
public void setProperty( String key, String value ) {
|
||||
properties.put( key, value );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of a property.
|
||||
*
|
||||
* @param key
|
||||
* the key
|
||||
* @return the current value
|
||||
*/
|
||||
public String getProperty( String key ) {
|
||||
return properties.get( key );
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the added files to a WebAssembly module in text representation.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user