From 8a701c68d8f8a8e66c30aa5d937eed2cbb8edada Mon Sep 17 00:00:00 2001 From: Max Bureck Date: Mon, 23 Jul 2018 17:04:51 +0200 Subject: [PATCH] #18: Provides package-info.java files for each package Task-Url: https://github.com/fraunhoferfokus/Xtensions/issues/18 --- .../xtensions/concurrent/package-info.java | 26 +++++++++++++++++++ .../xtensions/datetime/package-info.java | 10 +++++++ .../xtensions/function/package-info.java | 12 +++++++++ .../xtensions/optional/package-info.java | 22 ++++++++++++++++ .../fokus/xtensions/pair/package-info.java | 5 ++++ .../fokus/xtensions/range/package-info.java | 5 ++++ .../fokus/xtensions/stream/package-info.java | 11 ++++++++ .../string/StringSplitExtensions.xtend | 4 +-- .../fokus/xtensions/string/package-info.java | 14 ++++++++++ 9 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/concurrent/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/datetime/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/function/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/optional/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/pair/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/range/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/stream/package-info.java create mode 100644 bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/package-info.java diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/concurrent/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/concurrent/package-info.java new file mode 100644 index 0000000..e9f325f --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/concurrent/package-info.java @@ -0,0 +1,26 @@ +/** + * This package contains classes providing extension methods for JDK classes + * related to concurrent programming and some new functionality for scheduling + * concurrently executed pieces of code.
+ *
+ * The {@link de.fhg.fokus.xtensions.concurrent.CompletableFutureExtensions + * CompletableFutureExtensions} class provides extension methods for the JDK + * class {@link java.util.concurrent.CompletableFuture CompletableFuture}.
+ *
+ * The class {@link de.fhg.fokus.xtensions.concurrent.AsyncCompute AsyncCompute} + * provides extension methods on the JDK classes + * {@link java.util.concurrent.Executor Executor} and + * {@link java.util.concurrent.ScheduledExecutorService + * ScheduledExecutorService} that basically dispatch work on the executors and + * return {@code CompletableFuture}s being completed with the result of the + * computation. Note that there are similar methods provided in the + * {@code CompletableFuture} class, but the methods provided in + * {@code AsyncCompute} are more natural to use with Xtend.
+ *
+ * The class {@link de.fhg.fokus.xtensions.concurrent.SchedulingUtil + * SchedulingUtil} provides methods to schedule tasks for later or re-occurring + * execution. Some of these methods can be used as extension methods on + * {@link java.util.concurrent.ScheduledExecutorService + * ScheduledExecutorService}. + */ +package de.fhg.fokus.xtensions.concurrent; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/datetime/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/datetime/package-info.java new file mode 100644 index 0000000..f98ce91 --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/datetime/package-info.java @@ -0,0 +1,10 @@ +/** + * This package holds classes providing extension methods for the + * {@code java.time} API.
+ *
+ * Currently only extension methods for the {@link java.time.Duration Duration} + * class is provided in the + * {@link de.fhg.fokus.xtensions.datetime.DurationExtensions DurationExtensions} + * class. + */ +package de.fhg.fokus.xtensions.datetime; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/function/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/function/package-info.java new file mode 100644 index 0000000..a25bcdb --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/function/package-info.java @@ -0,0 +1,12 @@ +/** + * This package holds classes providing extension methods for the functional + * interfaces defined in Xtend's standard library. + *
+ *
+ * Extension methods for the interfaces defined in {@link org.eclipse.xtext.xbase.lib.Functions} + * are defined in class {@link de.fhg.fokus.xtensions.function.FunctionExtensions FunctionExtensions}. + *
+ * In future this package may also hold classes for concepts of functional + * programming, that can be considered useful in Xtend code bases. + */ +package de.fhg.fokus.xtensions.function; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/optional/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/optional/package-info.java new file mode 100644 index 0000000..e23c384 --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/optional/package-info.java @@ -0,0 +1,22 @@ +/** + * This package contains classes providing extension methods on the + * {@code Optional} types provided by the JDK.
+ *
+ * Extension methods for {@link java.util.Optional Optional} are defined in + * {@link de.fhg.fokus.xtensions.optional.OptionalExtensions + * OptionalExtensions}.
+ *
+ * Extension methods for {@link java.util.Optional OptionalInt} are defined in + * {@link de.fhg.fokus.xtensions.optional.OptionalExtensions + * OptionalIntExtensions}.
+ *
+ * Extension methods for {@link java.util.Optional OptionalLong} are defined in + * {@link de.fhg.fokus.xtensions.optional.OptionalExtensions + * OptionalLongExtensions}.
+ *
+ * Extension methods for {@link java.util.Optional OptionalDouble} are defined + * in {@link de.fhg.fokus.xtensions.optional.OptionalExtensions + * OptionaDoublelExtensions}.
+ *
+ */ +package de.fhg.fokus.xtensions.optional; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/pair/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/pair/package-info.java new file mode 100644 index 0000000..33ff38b --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/pair/package-info.java @@ -0,0 +1,5 @@ +/** + * This package holds classes providing extension methods for the + * Xtend library class {@link org.eclipse.xtext.xbase.lib.Pair Pair}. + */ +package de.fhg.fokus.xtensions.pair; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/range/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/range/package-info.java new file mode 100644 index 0000000..2e54d15 --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/range/package-info.java @@ -0,0 +1,5 @@ +/** + * This package holds classes providing extension methods for the + * Xtend library class {@link org.eclipse.xtext.xbase.lib.IntegerRange IntegerRange}. + */ +package de.fhg.fokus.xtensions.range; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/stream/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/stream/package-info.java new file mode 100644 index 0000000..a58980b --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/stream/package-info.java @@ -0,0 +1,11 @@ +/** + * This package contains classes providing extension methods for the JDK class + * {@link java.util.stream.Stream Stream}. Some of the extension methods provide + * functionality known from Xtend's Iterator/Iterable extension methods to make + * the experience of using {@code Stream}s more naturally with Xtend. Other + * extension methods make use of the feature that extension methods in Xtend can + * be defined on specialized generic types; the class + * {@link de.fhg.fokus.xtensions.stream.StringStreamExtensions + * StringStreamExtensions} provide extension methods on {@code Stream}. + */ +package de.fhg.fokus.xtensions.stream; \ No newline at end of file diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/StringSplitExtensions.xtend b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/StringSplitExtensions.xtend index 44fa021..6de2d40 100644 --- a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/StringSplitExtensions.xtend +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/StringSplitExtensions.xtend @@ -37,7 +37,7 @@ class StringSplitExtensions { * so it is is suited well for finding tokens in a string and stop splitting * as soon as a particular element is found. This also reduces memory copying * to unused strings. - * @param toSplit input string to split on {@code pattern}. Must not be null + * @param toSplit input char sequence to split on {@code pattern}. Must not be null * @param pattern the pattern defining where to split the input string {@code toSplit}. * @param limit maximum amount of elements provided by the returned iterator. * @return iterator providing the split results @@ -45,7 +45,7 @@ class StringSplitExtensions { * @throws java.util.regex.PatternSyntaxException if the {@code pattern}'s syntax is invalid * @see String#split(String,int) */ - static def Iterator splitIt(String toSplit, String pattern, int limit) { + static def Iterator splitIt(CharSequence toSplit, String pattern, int limit) { toSplit.splitIt(Pattern.compile(pattern), limit) } diff --git a/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/package-info.java b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/package-info.java new file mode 100644 index 0000000..0201b58 --- /dev/null +++ b/bundles/de.fhg.fokus.xtensions/src/de/fhg/fokus/xtensions/string/package-info.java @@ -0,0 +1,14 @@ +/** + * This package contains classes providing extension methods for the subclasss of JDK class + * {@link java.lang.CharSequence CharSequence} (e.g. {@link java.lang.String String}).
+ *
+ * To obtain an {@link java.util.Iterator Iterator} lazily progress over matches + * of a regex pattern, the + * {@link de.fhg.fokus.xtensions.string.StringMatchExtensions + * StringMatchExtensions} class provides respective extension methods.
+ *
+ * To lazily split a string based on a pattern using an {@code Iterator}, the + * class {@link de.fhg.fokus.xtensions.string.StringSplitExtensions StringSplitExtensions} + * provides respective extension methods. + */ +package de.fhg.fokus.xtensions.string; \ No newline at end of file