Package aQute.bnd.osgi
Class Instructions
java.lang.Object
aQute.bnd.osgi.Instructions
- All Implemented Interfaces:
Map<Instruction,
Attrs>
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Instructions
(package private) static Map<Instruction,
Attrs> private LinkedHashMap<Instruction,
Attrs> -
Constructor Summary
ConstructorsConstructorDescriptionInstructions
(Parameters contained) Instructions
(Instructions other) Instructions
(Collection<String> other) -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(Parameters other) void
appendIfAbsent
(Parameters other) void
clear()
boolean
containsKey
(Instruction name) boolean
containsKey
(Object name) Deprecated.boolean
containsValue
(Attrs value) boolean
containsValue
(Object value) Deprecated.void
decorate
(Parameters parameters) Match the instruction against the parameters and merge the attributes if matches.void
decorate
(Parameters parameters, boolean addLiterals) Match the instruction against the parameters and merge the attributes if matches.entrySet()
get
(Instruction key) Deprecated.boolean
isEmpty()
keySet()
boolean
matchesStream
(String value) put
(Instruction key, Attrs value) void
putAll
(Map<? extends Instruction, ? extends Attrs> map) <T> Collection<T>
reject
(Collection<T> set) remove
(Instruction var0) Deprecated.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) int
size()
stream()
toString()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
map
-
ALWAYS
-
EMPTY
-
-
Constructor Details
-
Instructions
-
Instructions
-
Instructions
public Instructions() -
Instructions
-
Instructions
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in interfaceMap<Instruction,
Attrs>
-
containsKey
-
containsKey
Deprecated.- Specified by:
containsKey
in interfaceMap<Instruction,
Attrs>
-
containsValue
-
containsValue
Deprecated.- Specified by:
containsValue
in interfaceMap<Instruction,
Attrs>
-
entrySet
- Specified by:
entrySet
in interfaceMap<Instruction,
Attrs>
-
stream
-
get
Deprecated.- Specified by:
get
in interfaceMap<Instruction,
Attrs>
-
get
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMap<Instruction,
Attrs>
-
keySet
- Specified by:
keySet
in interfaceMap<Instruction,
Attrs>
-
put
- Specified by:
put
in interfaceMap<Instruction,
Attrs>
-
putAll
- Specified by:
putAll
in interfaceMap<Instruction,
Attrs>
-
remove
Deprecated.- Specified by:
remove
in interfaceMap<Instruction,
Attrs>
-
remove
-
size
public int size()- Specified by:
size
in interfaceMap<Instruction,
Attrs>
-
values
- Specified by:
values
in interfaceMap<Instruction,
Attrs>
-
toString
-
append
-
appendIfAbsent
-
select
-
select
-
reject
-
matcher
-
finder
-
matches
-
matchesStream
-
select
Deprecated.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.- Parameters:
base
- The directory to list files from.- Returns:
- The map that links files to attributes
-
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
-