Class Instructions
java.lang.Object
aQute.bnd.osgi.Instructions
- All Implemented Interfaces:
Map<Instruction, Attrs>
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstructions(Parameters contained) Instructions(Instructions other) Instructions(Collection<String> other) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(Parameters other) voidappendIfAbsent(Parameters other) voidclear()booleancontainsKey(Instruction name) booleancontainsKey(Object name) Deprecated.booleancontainsValue(Attrs value) booleancontainsValue(Object value) Deprecated.voiddecorate(Parameters parameters) Match the instruction against the parameters and merge the attributes if matches.voiddecorate(Parameters parameters, boolean addLiterals) Match the instruction against the parameters and merge the attributes if matches.entrySet()get(Instruction key) Deprecated.booleanisEmpty()keySet()booleanaQute.bnd.stream.MapStream<Instruction, Attrs> matchesStream(String value) put(Instruction key, Attrs value) voidputAll(Map<? extends Instruction, ? extends Attrs> map) <T> Collection<T> reject(Collection<T> set) remove(Instruction var0) Deprecated.Turn this Instructions into a map of File -> Attrs.<T> Collection<T> select(Collection<T> set, boolean emptyIsAll) <T> Collection<T> select(Collection<T> set, Set<Instruction> unused, boolean emptyIsAll) intsize()aQute.bnd.stream.MapStream<Instruction, Attrs> stream()toString()values()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
ALWAYS
-
-
Constructor Details
-
Instructions
-
Instructions
-
Instructions
public Instructions() -
Instructions
-
Instructions
-
-
Method Details
-
clear
public void clear()- Specified by:
clearin interfaceMap<Instruction, Attrs>
-
containsKey
-
containsKey
Deprecated.- Specified by:
containsKeyin interfaceMap<Instruction, Attrs>
-
containsValue
-
containsValue
Deprecated.- Specified by:
containsValuein interfaceMap<Instruction, Attrs>
-
entrySet
- Specified by:
entrySetin interfaceMap<Instruction, Attrs>
-
stream
-
get
Deprecated.- Specified by:
getin interfaceMap<Instruction, Attrs>
-
get
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<Instruction, Attrs>
-
keySet
- Specified by:
keySetin interfaceMap<Instruction, Attrs>
-
put
- Specified by:
putin interfaceMap<Instruction, Attrs>
-
putAll
- Specified by:
putAllin interfaceMap<Instruction, Attrs>
-
remove
Deprecated.- Specified by:
removein interfaceMap<Instruction, Attrs>
-
remove
-
size
public int size()- Specified by:
sizein interfaceMap<Instruction, Attrs>
-
values
- Specified by:
valuesin interfaceMap<Instruction, Attrs>
-
toString
-
append
-
appendIfAbsent
-
select
-
select
-
reject
-
matcher
-
finder
-
matches
-
matchesStream
-
select
public Map<File, List<Attrs>> select(File base, Function<String, String> mapper, Set<Instruction> missing) Turn this Instructions into a map of File -> Attrs. You can specify a base directory, which will match all files in that directory against the specification or you can use literal instructions to get files from anywhere.A mapping function can be provided to rename literal names. This was added to map '.' and '' to 'bnd.bnd'. However, this can be generally useful.
- Parameters:
base- The directory to list files from.mapper- Maps the literal names.- Returns:
- The map that links files to attributes
-
decorate
Match the instruction against the parameters and merge the attributes if matches. Remove any negated instructions. Literal unmatched instructions are not added- Parameters:
parameters- the parameters to decorate
-
decorate
Match the instruction against the parameters and merge the attributes if matches. Remove any negated instructions. Literal unmatched instructions are added if the addLiterals is true- Parameters:
parameters- the parameters to decorateaddLiterals- add literals to the output
-