Index

A B C D E F G H I L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form

A

accept(T) - Method in interface bm.util.ConsumeOrThrow
 
accept(T) - Method in interface bm.util.ConsumeOrThrow.CoT
 
add(E...) - Method in class bm.util.Lister
Adds all given elements.
add(Object) - Method in class bm.util.StringLister
Deprecated.
 
add(String, T) - Method in class bm.Build
Adds a target with description.
add(Collection<E>) - Method in class bm.util.Lister
Adds all given elements.
add(Function<T, E>, Collection<T>) - Method in class bm.util.Lister
Adds elements of a collection after mapping them.
add(T) - Method in class bm.Build
Adds a target without description.
addAlias(String, String, T) - Method in class bm.Build
Adds a target under a different name with description.
addAlias(String, T) - Method in class bm.Build
Calls Build.addAlias(String, String, Target) with an empty description.
addBuildInspectionTargets() - Method in class bm.Build
addDependencyTreeTarget() - Method in class bm.Build
Adds a target with the name "dependencytree" to print a dependency tree in graphviz format.
addIf(Predicate<E>, E...) - Method in class bm.util.Lister
Adds all given elements if the predicate applied on the elements is true.
addJoined(String, Collection<String>) - Method in class bm.util.StringLister
Deprecated.
Joins a collections and adds it to the list
addJoined(Function<T, String>, String, Collection<T>) - Method in class bm.util.StringLister
Deprecated.
Joins collection elements after mapping them and adds the result to this list.
addJoined(Function<T, S>, Function<List<S>, E>, Collection<T>) - Method in class bm.util.Lister
Map all elements of args through the mapper.
addState(Consumer<byte[]>) - Method in interface bm.machine.StateProvider
Given a sink for byte[] this method should provide bytes representing a target's value.
addState(Consumer<byte[]>) - Method in class bm.target.FileBooleanState
 
addState(Consumer<byte[]>) - Method in class bm.target.FileContentState
Adds the managed files' state to the given consumer.
addState(Consumer<byte[]>) - Method in class bm.target.FileTarget
 
addState(Consumer<byte[]>) - Method in class bm.target.FixedStateTarget
 
addState(Consumer<byte[]>) - Method in record class bm.target.StringTarget
 
addTargetlisterTarget() - Method in class bm.Build
Adds a target with the name "targetlist" to print the list of targets we know about.
alias() - Method in record class bm.Build.SortableTarget
Returns the value of the alias record component.
alias(String, Target) - Static method in class bm.target.FixedStateTarget
Creates a target with no builder which is never outdated itself.
asTarget(String, Path) - Method in class bm.repositories.RepoFile
 

B

bm - package bm
Provides a simple command line wrapper Build around Machine.
bm.javautil - package bm.javautil
 
bm.machine - package bm.machine
Provides the main entry point Machine.update(bm.machine.Target) which needs a Target passed in to be build.
bm.repositories - package bm.repositories
 
bm.target - package bm.target
Provides implementations of Target.
bm.util - package bm.util
Utitlities which make it easier to define tasks, targets and dependencies.
Build - Class in bm
Supportive wrapper to manage a build.
Build(String, SupplyOrThrow<StateStore>) - Constructor for class bm.Build
Creates the wrapper and specifies a default target.
Build(String, Path) - Constructor for class bm.Build
Creates the wrapper and specifies a default target.
Build.Cmdline - Record Class in bm
Build.SortableTarget - Record Class in bm
builder() - Method in record class bm.target.StringTarget
Returns the value of the builder record component.
BuildProblemException - Exception Class in bm.machine
To be thrown if the build encounters a problem.
BuildProblemException(String) - Constructor for exception class bm.machine.BuildProblemException
Creates the exception.
BuildProblemException(String, Throwable) - Constructor for exception class bm.machine.BuildProblemException
Creates the exception
buildWith(ConsumeOrThrow<FileTarget>) - Method in class bm.target.FileTarget
 
ByteContentUtils - Class in bm.target
Utilities to convert data to byte[].

C

classifier - Variable in class bm.repositories.RepoFile
classifier of the artifact, may be null
close() - Method in class bm.machine.PropertiesStateStore
 
close() - Method in interface bm.machine.StateStore
 
Cmdline(List<String>, Map<String, String>) - Constructor for record class bm.Build.Cmdline
Creates an instance of a Cmdline record class.
ConsumeOrThrow<T> - Interface in bm.util
A consumer which may throw a BuildProblemException.
ConsumeOrThrow.CoT<T,E> - Interface in bm.util
A Consumer which may throw any type of Exception.
contains(String) - Static method in interface bm.util.PathPredicates
Creates a predicate to test if Path.toString() contains the string.
containsRe(String) - Static method in interface bm.util.PathPredicates
Creates a predicate to test if Path.toString() contains the regular expression.
content() - Method in record class bm.target.StringTarget
Returns the value of the content record component.
copyFile(Path, FileTarget) - Static method in class bm.util.Util
Copies files and directories recursively.
copyFile(Path, Path) - Static method in class bm.util.Util
Copies files and directories recursively.
createFileCopyTarget(String, String) - Static method in class bm.util.Util
 
createFileCopyTarget(String, Path) - Static method in class bm.util.Util
 
createFileCopyTarget(Path, Path) - Static method in class bm.util.Util
Creates a target which uses copyFile(java.nio.file.Path, bm.target.FileTarget) to assure the target is a copy of the given file or directory.
currentValue() - Method in record class bm.target.StringTarget
A shortcut for StringTarget.content().get().

D

DefaultExecs - Class in bm.javautil
Provides default exec calls for several typical Java tasks.
defaultJavac(FileTarget, FileTarget, FileTarget, List<String>) - Static method in class bm.javautil.DefaultExecs
 
defaultJunit(Target, List<String>, Path, List<String>) - Static method in class bm.javautil.DefaultExecs
 
dependencies() - Method in record class bm.target.StringTarget
Returns the value of the dependencies record component.
dependsOn(Target...) - Method in class bm.target.FileTarget
 
dependsOn(List<? extends Target>) - Method in class bm.target.FileTarget
 
depth() - Method in record class bm.Build.SortableTarget
Returns the value of the depth record component.
description() - Method in record class bm.Build.SortableTarget
Returns the value of the description record component.
descriptions() - Method in class bm.Build
 
directoryCreateTarget(Path) - Static method in class bm.target.FileTarget
Creates a target with a builder to create a directory if it does not exist.
download(URL, Path) - Static method in class bm.util.Util
Downloads data from a URL and saves it into the given path.

E

endsWith(String) - Static method in interface bm.util.PathPredicates
Creates a predicate to test if Path.toString() ends with the string.
equals(Object) - Method in record class bm.Build.Cmdline
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class bm.Build.SortableTarget
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class bm.target.StringTarget
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class bm.util.Exec.Out
Indicates whether some other object is "equal to" this one.
Example - Search tag in bm.javautil.RunJunit4.main(String[])
Section
exec(ProcessBuilder) - Static method in class bm.util.Exec
Executes the process and waits for the termination.
exec(ProcessBuilder, Consumer<Process>) - Static method in class bm.util.Exec
Starts the process defined by the process builder, then applies the given consumer and then waits for the process to teminate.
exec(String, String...) - Static method in class bm.util.Exec
Calls Exec.exec(List) after wrapping the arguments into a list.
exec(List<String>) - Static method in class bm.util.Exec
Simplified API to start a process with default std(in|out|err) and wait for the outcome.
exec(List<String>, Path, Path) - Static method in class bm.util.Exec
Executes the command line and waits for the termination.
Exec - Class in bm.util
Somewhat simplified apis around ProcessBuilder to run sub-processes.
Exec() - Constructor for class bm.util.Exec
 
Exec.Out - Record Class in bm.util
Provides standard and error output and the exit code of a process as strings after the process exits.
execReadBoth(List<String>) - Static method in class bm.util.Exec
Executes the command line and reads both, standard output and standard error to return it as part of the result.
execReadStderr(List<String>) - Static method in class bm.util.Exec
Executes the command line and reads standard error to return it as part of the result.
execReadStdout(List<String>) - Static method in class bm.util.Exec
Executes the command line and reads standard output to return it as part of the result.
exitCode() - Method in record class bm.util.Exec.Out
Returns the value of the exitCode record component.

F

fetch(String, Path) - Method in class bm.repositories.RepoFile
 
FileBooleanState - Class in bm.target
Provides the state of a file based on a boolean predicate only, meaning the file can only be in two states: either the predicate returns true or it returns false.
FileBooleanState(Path, Predicate<Path>) - Constructor for class bm.target.FileBooleanState
Creates a file state which adds the same constant value in FileBooleanState.addState(java.util.function.Consumer<byte[]>) if and only if the given feature is true.
fileContentBytes(Consumer<byte[]>, Path) - Static method in class bm.target.ByteContentUtils
 
FileContentState - Class in bm.target
Provides file or directory states reading either the full content of files or only their last modified time, depending on the factory method used.
FileContentState(Path, FileContentState.ByteSource) - Constructor for class bm.target.FileContentState
Calls the 4 parameter constructor with predicates which always return true.
FileContentState(Path, FileContentState.ByteSource, Predicate<Path>) - Constructor for class bm.target.FileContentState
Calls the 4 parameter constructor with a directory predicate which always returns true.
FileContentState(Path, FileContentState.ByteSource, Predicate<Path>, Predicate<Path>) - Constructor for class bm.target.FileContentState
Creates an instance.
FileContentState.ByteSource - Interface in bm.target
 
filename() - Method in class bm.repositories.RepoFile
Returns the file name created from name, version and type as name-version-classifier.type where the "-classifier" part is optional.
filename(Path) - Method in class bm.repositories.RepoFile
Returns the file name created from name, version and type as name-version.type
FilesStateStore - Class in bm.machine
Provides a state store with one file per target holding the target's state.
FilesStateStore(Path) - Constructor for class bm.machine.FilesStateStore
 
FileState - Interface in bm.target
 
FileTarget - Class in bm.target
A target representing the state of a file or all files found in a directory, based on a checksum taken over the file/all files.
FileTarget(FileState, List<? extends Target>, ConsumeOrThrow<FileTarget>) - Constructor for class bm.target.FileTarget
Creates an instance.
filterMap(Iterable<I>, Function<I, O>) - Static method in class bm.util.Util
NOTE: Yes, I know streams.
FindFiles - Class in bm.util
Methods to recursively collect files.
FindFiles() - Constructor for class bm.util.FindFiles
 
FixedStateTarget - Class in bm.target
A target with a state that cannot be changed by "building" it.
FixedStateTarget(Consumer<Consumer<byte[]>>, String, List<? extends Target>, ConsumeOrThrow<FixedStateTarget>) - Constructor for class bm.target.FixedStateTarget
Creates a target with a fixed state generator.
fromContent(String) - Static method in class bm.target.FileContentState
Creates a file/directory state provider from full file contents.
fromContent(Path) - Static method in class bm.target.FileContentState
Creates a file/directory state provider from full file contents.
fromEnv(String, String) - Static method in record class bm.target.StringTarget
Creates an instance for the value of an environment variable with no builder and setting the StringTarget.content to a method retrieving the environment variable.
fromGradleShort(String, String) - Static method in class bm.repositories.RepoFile
Creates the object.
fromLastModified(String) - Static method in class bm.target.FileContentState
Creates a file/directory state provider from a file's last modified time.
fromLastModified(Path) - Static method in class bm.target.FileContentState
Creates a file/directory state provider from a file's last modified time.
fromMap(Map<String, String>, String, String) - Static method in record class bm.target.StringTarget
Creates an instance for the value from the given map with no builder and setting the StringTarget.content() fo a method retrieven the value from the map when requested.
fromProperty(String, String) - Static method in record class bm.target.StringTarget
Creates an instance for the value of a property with no builder and setting the StringTarget.content to a method retrieving the property.

G

get() - Method in class bm.util.Lister
Provides the list.
get() - Method in interface bm.util.SupplyOrThrow
 
get() - Method in interface bm.util.SupplyOrThrow.SoT
 
getDependencies() - Method in interface bm.machine.Target
Return the list of targets this one depends on when being build.
getDependencies() - Method in class bm.target.FileTarget
 
getDependencies() - Method in class bm.target.FixedStateTarget
 
getDependencies() - Method in record class bm.target.StringTarget
 
getFiles() - Method in class bm.target.FileTarget
Provides all files in the target's directory or just the file.
getFilesRelative() - Method in class bm.target.FileTarget
Provides all files in the target's directory or just the file.
getMachine() - Method in class bm.Build
 
getManagedFiles() - Method in class bm.target.FileBooleanState
 
getManagedFiles() - Method in class bm.target.FileContentState
Provides known files.
getManagedFiles() - Method in interface bm.target.FileState
Provides known files.
getManagedRelative() - Method in interface bm.target.FileState
Provides known files below the target but as paths relative to the target
getName() - Method in interface bm.machine.Target
The name of the target, unique within the graph of targets.
getName() - Method in class bm.target.FileTarget
A file target's name is the name of the target path.
getName() - Method in class bm.target.FixedStateTarget
 
getName() - Method in record class bm.target.StringTarget
 
getPath() - Method in class bm.target.FileTarget
Provides the target's path
getTargetPath() - Method in class bm.target.FileBooleanState
 
getTargetPath() - Method in class bm.target.FileContentState
The path of the target this objects represents.
getTargetPath() - Method in interface bm.target.FileState
The path of the target this objects represents.
getTargets(String...) - Method in class bm.Build
Provides the Target objects for the given names.
glob(String) - Static method in class bm.util.FindFiles
Finds recursively all accessible files determined by the glob pattern which should fit the description of PathMatcher.
group - Variable in class bm.repositories.RepoFile
group name of the artifact

H

hashCode() - Method in record class bm.Build.Cmdline
Returns a hash code value for this object.
hashCode() - Method in record class bm.Build.SortableTarget
Returns a hash code value for this object.
hashCode() - Method in record class bm.target.StringTarget
Returns a hash code value for this object.
hashCode() - Method in record class bm.util.Exec.Out
Returns a hash code value for this object.
How do I create a target? - Search tag in package bm
Section

I

I DON'T GET IT - Search tag in record class bm.target.StringTarget
Section
includeDir() - Method in interface bm.util.PathPredicates
 
includeDir() - Method in class bm.util.SameFiles
 
includeFile() - Method in interface bm.util.PathPredicates
 
includeFile() - Method in class bm.util.SameFiles
 
initLogging(OutputStream) - Static method in class bm.Build
Initialize logging with a simple plain format.
instantBytes(Consumer<byte[]>, Instant) - Static method in class bm.target.ByteContentUtils
 
isDirectoryState(Path) - Static method in class bm.target.FileBooleanState
Creates a file state which is in state true if the given path exists as a directory.
isEmpty(Path) - Static method in class bm.util.Util
The Javadoc for Path talks at great length about the "empty path", but they forgot to provide the respective test.
isRegularFileState(Path) - Static method in class bm.target.FileBooleanState
Creates a file state which is in state true if the given path exists as a regular file.

L

lastModifiedBytes(Consumer<byte[]>, Path) - Static method in class bm.target.ByteContentUtils
 
Lister<E> - Class in bm.util
Fluent api to build up a List of some type from various ingredients.
Lister() - Constructor for class bm.util.Lister
Creates an empty one.
Lister(E, E...) - Constructor for class bm.util.Lister
Creates the object from initial elements.
Lister(Collection<E>) - Constructor for class bm.util.Lister
Creates the object from initial elements.

M

machine - Variable in class bm.Build
The Machine we work with here.
Machine - Class in bm.machine
Machinery to build things.
Machine(SupplyOrThrow<StateStore>) - Constructor for class bm.machine.Machine
Creates the machine with its state store.
main(String[]) - Static method in class bm.javautil.RunJunit4
Runs Junit on classes if their fully qualified name contains a match of a regex given on the command line.
matches(String) - Static method in interface bm.util.PathPredicates
Creates a predicate to test if Path.toString() matches the regular expression.

N

name - Variable in class bm.repositories.RepoFile
name of the artifact
name() - Method in record class bm.target.StringTarget
Returns the value of the name record component.

O

of(ConsumeOrThrow.CoT<V, EX>) - Static method in interface bm.util.ConsumeOrThrow
Creates a consumer to convert an arbitrary Exception thrown to a BuildProblemException.
of(RunOrThrow.RoT<EX>) - Static method in interface bm.util.RunOrThrow
Creates a runnable to convert an arbitrary Exception thrown to a BuildProblemException.
of(SupplyOrThrow.SoT<V, EX>) - Static method in interface bm.util.SupplyOrThrow
Creates a runnable to convert an arbitrary Exception thrown to a BuildProblemException.
of(Collection<T>) - Static method in class bm.util.Lister
Creates an initial object.
onDependencyChange(String, List<? extends Target>) - Static method in class bm.target.FixedStateTarget
Similar to FixedStateTarget.alias(java.lang.String, bm.machine.Target) but for multiple dependencies
onDependencyChange(String, List<? extends Target>, ConsumeOrThrow<FixedStateTarget>) - Static method in class bm.target.FixedStateTarget
Creates a target with dependencies which runs the builder only if any of these change.
Out(String, String, int) - Constructor for record class bm.util.Exec.Out
Creates an instance of a Out record class.

P

parameters() - Method in record class bm.Build.Cmdline
Returns the value of the parameters record component.
parseCmdline(String[]) - Method in class bm.Build
Two types of command line arguments are handled.
PATH_EMPTY - Static variable in class bm.util.Exec
 
PathPredicates - Interface in bm.util
 
printDependencyTree() - Method in class bm.Build
Creates a digraph on stdout which can be understood by the dot program from graphviz.
PropertiesStateStore - Class in bm.machine
Provides a state store kept in a single properties file.
PropertiesStateStore(Path) - Constructor for class bm.machine.PropertiesStateStore
 
provide(Consumer<byte[]>, Path) - Method in interface bm.target.FileContentState.ByteSource
 

R

readHash(String) - Method in class bm.machine.FilesStateStore
 
readHash(String) - Method in class bm.machine.PropertiesStateStore
 
readHash(String) - Method in interface bm.machine.StateStore
Gets a hash value for the given name.
recreate() - Method in interface bm.machine.Target
Recreate this target.
recreate() - Method in class bm.target.FileTarget
 
recreate() - Method in class bm.target.FixedStateTarget
 
recreate() - Method in record class bm.target.StringTarget
 
recursiveDelete(String) - Static method in class bm.util.Util
Recursively delete a directory.
recursiveDelete(Path) - Static method in class bm.util.Util
Recursively delete a directory.
RepoFile - Class in bm.repositories
Data holder for a typical maven repository file with group, name and version.
RepoFile(String, String, String, String, String) - Constructor for class bm.repositories.RepoFile
Creates the object
repoUrl(String) - Method in class bm.repositories.RepoFile
Creates a repository URL path and appends it to the given repository base URL.
requestedTargets() - Method in record class bm.Build.Cmdline
Returns the value of the requestedTargets record component.
run() - Method in interface bm.util.RunOrThrow.RoT
 
run() - Method in interface bm.util.RunOrThrow
 
runAlways(String, ConsumeOrThrow<FixedStateTarget>) - Static method in class bm.target.FixedStateTarget
Creates a target with no dependencies with a build which is always run.
runAlways(String, List<? extends Target>, ConsumeOrThrow<FixedStateTarget>) - Static method in class bm.target.FixedStateTarget
Creates a target with dependencies with a build which is always run.
RunJunit4 - Class in bm.javautil
Provides a way to run Junit4 on a list of classes with logging to blend in with other BuildMachine logging.
RunOrThrow - Interface in bm.util
A runnable which may throw a BuildProblemException.
RunOrThrow.RoT<E> - Interface in bm.util
A Runnable which may throw any type of Exception.

S

SameFiles - Class in bm.util
SameFiles(FileTarget) - Constructor for class bm.util.SameFiles
 
saveHash(String, byte[]) - Method in class bm.machine.FilesStateStore
 
saveHash(String, byte[]) - Method in class bm.machine.PropertiesStateStore
 
saveHash(String, byte[]) - Method in interface bm.machine.StateStore
 
scaledStamp(Duration) - Static method in class bm.util.Util
Formats the duration as an integer with a time unit appended.
SortableTarget(Target, int, String, String) - Constructor for record class bm.Build.SortableTarget
Creates an instance of a SortableTarget record class.
startsWith(String) - Static method in interface bm.util.PathPredicates
Creates a predicate to test if Path.toString() starts with the string.
StateProvider - Interface in bm.machine
Helps to manage the state of a target by persisting its state separately from it to be able to detect when the target and its safed state deviate.
StateStore - Interface in bm.machine
The API Machine needs to keep target state hashes in persistent storage between invocations,
stderr() - Method in record class bm.util.Exec.Out
Returns the value of the stderr record component.
stdout() - Method in record class bm.util.Exec.Out
Returns the value of the stdout record component.
StringLister - Class in bm.util
Deprecated.
Mixing this with Lister is no good because a return this in a superclass function returns the wrong type, namely Lister<String> not StringLister.
StringLister(String...) - Constructor for class bm.util.StringLister
Deprecated.
Creates an initial list.
StringTarget - Record Class in bm.target
A target representing a string obtained by a supplier.
StringTarget(String, Supplier<String>) - Constructor for record class bm.target.StringTarget
Creates an instance with no dependencies and a no-op builder.
StringTarget(String, Supplier<String>, List<Target>) - Constructor for record class bm.target.StringTarget
Creates an instance with a no-op builder.
StringTarget(String, Supplier<String>, List<Target>, ConsumeOrThrow<Target>) - Constructor for record class bm.target.StringTarget
Creates an instance of a StringTarget record class.
SupplyOrThrow<V> - Interface in bm.util
A supplier which may throw a BuildProblemException.
SupplyOrThrow.SoT<R,E> - Interface in bm.util
A Supplier which may throw any type of Exception.

T

target() - Method in record class bm.Build.SortableTarget
Returns the value of the target record component.
Target - Interface in bm.machine
Describes a target to be built.
targetsAndProperties(String[]) - Method in class bm.Build
Deprecated.
Rather use Build.parseCmdline(java.lang.String[]) to avoid confusion over the priority between system properties set with -Dkey=value as a JVM argument and key=value as a main method argument.
toFileTarget() - Method in interface bm.target.FileState
Creates a FileTarget from this with no dependencies and no builder.
toFileTarget(List<T>, ConsumeOrThrow<FileTarget>) - Method in interface bm.target.FileState
Creates a FileTarget from this with the given dependencies and builder.
topologicallySorted() - Method in class bm.Build
 
toString() - Method in record class bm.Build.Cmdline
Returns a string representation of this record class.
toString() - Method in record class bm.Build.SortableTarget
Returns a string representation of this record class.
toString() - Method in class bm.target.FileTarget
 
toString() - Method in class bm.target.FixedStateTarget
 
toString() - Method in record class bm.target.StringTarget
Returns a string representation of this record class.
toString() - Method in record class bm.util.Exec.Out
Returns a string representation of this record class.
triggeringDepencendies(Target) - Method in class bm.machine.Machine
Once the target's update process has proceeded far enough to be sure about the dependencies that are triggering its recreation, this returns those dependencies, otherwise null is returned.

U

update(Target) - Method in class bm.machine.Machine
Updates the target, i.e.
update(String) - Method in class bm.Build
Looks up the target name and calls a Machine instance with the target found.
updateAll(List<String>) - Method in class bm.Build
To be called with a list if target after after targets have been added.
Util - Class in bm.util
A collection of generally useful things.

V

version - Variable in class bm.repositories.RepoFile
version of the artifact

W

wasRecreated(Target) - Method in class bm.machine.Machine
Was the target actually recreated so far?
wasUpdated(Target) - Method in class bm.machine.Machine
Was a target updated so far?
What is a Dependency? - Search tag in package bm
Section
What is a Target? - Search tag in package bm
Section
What is the State of a target? - Search tag in package bm
Section
withBuilder(ConsumeOrThrow<Target>) - Method in record class bm.target.StringTarget
Returns a shallow copy of this with the new builder.
withDependencies(List<Target>) - Method in record class bm.target.StringTarget
Returns a shallow copy of this with the new list of dependencies.
withDirPathFilter(Predicate<Path>) - Method in class bm.target.FileContentState
 
withFilePathFilter(Predicate<Path>) - Method in class bm.target.FileContentState
Creates a new FileState with the given filter for relative paths.
withName(String) - Method in class bm.target.FileTarget
Creates a new instance having the new name.
withPathFilters(PathPredicates) - Method in class bm.target.FileContentState
 
A B C D E F G H I L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form