repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/GetUtils.java
GetUtils.ensureNonNullAndNonEmpty
@Nonnull public static String ensureNonNullAndNonEmpty(@Nullable final String value, @Nonnull @Constraint("notEmpty(X)") final String dflt) { String result = value; if (result == null || result.isEmpty()) { assertFalse("Default value must not be empty", assertNotNull("Default value must not be null", df...
java
@Nonnull public static String ensureNonNullAndNonEmpty(@Nullable final String value, @Nonnull @Constraint("notEmpty(X)") final String dflt) { String result = value; if (result == null || result.isEmpty()) { assertFalse("Default value must not be empty", assertNotNull("Default value must not be null", df...
[ "@", "Nonnull", "public", "static", "String", "ensureNonNullAndNonEmpty", "(", "@", "Nullable", "final", "String", "value", ",", "@", "Nonnull", "@", "Constraint", "(", "\"notEmpty(X)\"", ")", "final", "String", "dflt", ")", "{", "String", "result", "=", "valu...
Get non-null non-empty string. @param value a base string @param dflt default string to be provided if value is null or empty @return non-nullable non-empty string @since 1.1.1
[ "Get", "non", "-", "null", "non", "-", "empty", "string", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/GetUtils.java#L104-L112
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/IOUtils.java
IOUtils.packData
@Nonnull @Weight(Weight.Unit.VARIABLE) public static byte[] packData(@Nonnull final byte[] data) { final Deflater compressor = new Deflater(Deflater.BEST_COMPRESSION); compressor.setInput(Assertions.assertNotNull(data)); compressor.finish(); final ByteArrayOutputStream resultData = new ByteArrayOutp...
java
@Nonnull @Weight(Weight.Unit.VARIABLE) public static byte[] packData(@Nonnull final byte[] data) { final Deflater compressor = new Deflater(Deflater.BEST_COMPRESSION); compressor.setInput(Assertions.assertNotNull(data)); compressor.finish(); final ByteArrayOutputStream resultData = new ByteArrayOutp...
[ "@", "Nonnull", "@", "Weight", "(", "Weight", ".", "Unit", ".", "VARIABLE", ")", "public", "static", "byte", "[", "]", "packData", "(", "@", "Nonnull", "final", "byte", "[", "]", "data", ")", "{", "final", "Deflater", "compressor", "=", "new", "Deflate...
Pack some binary data. @param data data to be packed @return packed data as byte array @since 1.0
[ "Pack", "some", "binary", "data", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/IOUtils.java#L54-L68
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/IOUtils.java
IOUtils.unpackData
@Nonnull @Weight(Weight.Unit.VARIABLE) public static byte[] unpackData(@Nonnull final byte[] data) { final Inflater decompressor = new Inflater(); decompressor.setInput(Assertions.assertNotNull(data)); final ByteArrayOutputStream outStream = new ByteArrayOutputStream(data.length * 2); final byte[] b...
java
@Nonnull @Weight(Weight.Unit.VARIABLE) public static byte[] unpackData(@Nonnull final byte[] data) { final Inflater decompressor = new Inflater(); decompressor.setInput(Assertions.assertNotNull(data)); final ByteArrayOutputStream outStream = new ByteArrayOutputStream(data.length * 2); final byte[] b...
[ "@", "Nonnull", "@", "Weight", "(", "Weight", ".", "Unit", ".", "VARIABLE", ")", "public", "static", "byte", "[", "]", "unpackData", "(", "@", "Nonnull", "final", "byte", "[", "]", "data", ")", "{", "final", "Inflater", "decompressor", "=", "new", "Inf...
Unpack binary data packed by the packData method. @param data packed data array @return unpacked byte array @throws IllegalArgumentException it will be thrown if the data has wrong format, global error listeners will be also notified @see #packData(byte[]) @since 1.0
[ "Unpack", "binary", "data", "packed", "by", "the", "packData", "method", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/IOUtils.java#L79-L95
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/ThreadUtils.java
ThreadUtils.silentSleep
@Weight(Weight.Unit.VARIABLE) public static boolean silentSleep(final long milliseconds) { boolean result = true; try { Thread.sleep(milliseconds); } catch (InterruptedException ex) { result = false; Thread.currentThread().interrupt(); } return result; }
java
@Weight(Weight.Unit.VARIABLE) public static boolean silentSleep(final long milliseconds) { boolean result = true; try { Thread.sleep(milliseconds); } catch (InterruptedException ex) { result = false; Thread.currentThread().interrupt(); } return result; }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "VARIABLE", ")", "public", "static", "boolean", "silentSleep", "(", "final", "long", "milliseconds", ")", "{", "boolean", "result", "=", "true", ";", "try", "{", "Thread", ".", "sleep", "(", "milliseconds", ...
Just suspend the current thread for defined interval in milliseconds. @param milliseconds milliseconds to sleep @return false if the sleep has been interrupted by InterruptedException, true otherwise. @see Thread#sleep(long) @since 1.0
[ "Just", "suspend", "the", "current", "thread", "for", "defined", "interval", "in", "milliseconds", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/ThreadUtils.java#L48-L58
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/ThreadUtils.java
ThreadUtils.stackElement
@Weight(Weight.Unit.VARIABLE) @Nonnull public static StackTraceElement stackElement() { final StackTraceElement[] allElements = Thread.currentThread().getStackTrace(); return allElements[2]; }
java
@Weight(Weight.Unit.VARIABLE) @Nonnull public static StackTraceElement stackElement() { final StackTraceElement[] allElements = Thread.currentThread().getStackTrace(); return allElements[2]; }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "VARIABLE", ")", "@", "Nonnull", "public", "static", "StackTraceElement", "stackElement", "(", ")", "{", "final", "StackTraceElement", "[", "]", "allElements", "=", "Thread", ".", "currentThread", "(", ")", "."...
Get the stack element of the method caller. @return the stack trace element for the calling method. @since 1.0
[ "Get", "the", "stack", "element", "of", "the", "method", "caller", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/ThreadUtils.java#L66-L71
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/exceptions/MetaErrorListeners.java
MetaErrorListeners.fireError
@Weight(Weight.Unit.VARIABLE) public static void fireError(@Nonnull final String text, @Nonnull final Throwable error) { for (final MetaErrorListener p : ERROR_LISTENERS) { p.onDetectedError(text, error); } }
java
@Weight(Weight.Unit.VARIABLE) public static void fireError(@Nonnull final String text, @Nonnull final Throwable error) { for (final MetaErrorListener p : ERROR_LISTENERS) { p.onDetectedError(text, error); } }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "VARIABLE", ")", "public", "static", "void", "fireError", "(", "@", "Nonnull", "final", "String", "text", ",", "@", "Nonnull", "final", "Throwable", "error", ")", "{", "for", "(", "final", "MetaErrorListener"...
Send notifications to all listeners. @param text message text @param error error object @since 1.0
[ "Send", "notifications", "to", "all", "listeners", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/exceptions/MetaErrorListeners.java#L92-L97
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.addSubTree
@Nonnull public ExpressionTreeElement addSubTree(@Nonnull final ExpressionTree tree) { assertNotEmptySlot(); final ExpressionTreeElement root = tree.getRoot(); if (!root.isEmptySlot()) { root.makeMaxPriority(); addElementToNextFreeSlot(root); } return this; }
java
@Nonnull public ExpressionTreeElement addSubTree(@Nonnull final ExpressionTree tree) { assertNotEmptySlot(); final ExpressionTreeElement root = tree.getRoot(); if (!root.isEmptySlot()) { root.makeMaxPriority(); addElementToNextFreeSlot(root); } return this; }
[ "@", "Nonnull", "public", "ExpressionTreeElement", "addSubTree", "(", "@", "Nonnull", "final", "ExpressionTree", "tree", ")", "{", "assertNotEmptySlot", "(", ")", ";", "final", "ExpressionTreeElement", "root", "=", "tree", ".", "getRoot", "(", ")", ";", "if", ...
Add a tree as new child and make the maximum priority for it @param tree a tree to be added as a child, must not be null @return it returns this
[ "Add", "a", "tree", "as", "new", "child", "and", "make", "the", "maximum", "priority", "for", "it" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L181-L191
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.replaceElement
public boolean replaceElement(@Nonnull final ExpressionTreeElement oldOne, @Nonnull final ExpressionTreeElement newOne) { assertNotEmptySlot(); if (oldOne == null) { throw new PreprocessorException("[Expression]The old element is null", this.sourceString, this.includeStack, null); } if (newOne =...
java
public boolean replaceElement(@Nonnull final ExpressionTreeElement oldOne, @Nonnull final ExpressionTreeElement newOne) { assertNotEmptySlot(); if (oldOne == null) { throw new PreprocessorException("[Expression]The old element is null", this.sourceString, this.includeStack, null); } if (newOne =...
[ "public", "boolean", "replaceElement", "(", "@", "Nonnull", "final", "ExpressionTreeElement", "oldOne", ",", "@", "Nonnull", "final", "ExpressionTreeElement", "newOne", ")", "{", "assertNotEmptySlot", "(", ")", ";", "if", "(", "oldOne", "==", "null", ")", "{", ...
It replaces a child element @param oldOne the old expression element to be replaced (must not be null) @param newOne the new expression element to be used instead the old one (must not be null) @return true if the element was found and replaced, else false
[ "It", "replaces", "a", "child", "element" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L200-L225
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.addTreeElement
@Nullable public ExpressionTreeElement addTreeElement(@Nonnull final ExpressionTreeElement element) { assertNotEmptySlot(); assertNotNull("The element is null", element); final int newElementPriority = element.getPriority(); ExpressionTreeElement result = this; final ExpressionTreeElement paren...
java
@Nullable public ExpressionTreeElement addTreeElement(@Nonnull final ExpressionTreeElement element) { assertNotEmptySlot(); assertNotNull("The element is null", element); final int newElementPriority = element.getPriority(); ExpressionTreeElement result = this; final ExpressionTreeElement paren...
[ "@", "Nullable", "public", "ExpressionTreeElement", "addTreeElement", "(", "@", "Nonnull", "final", "ExpressionTreeElement", "element", ")", "{", "assertNotEmptySlot", "(", ")", ";", "assertNotNull", "(", "\"The element is null\"", ",", "element", ")", ";", "final", ...
Add tree element with sorting operation depends on priority of the elements @param element the element to be added, must not be null @return the element which should be used as the last for the current tree
[ "Add", "tree", "element", "with", "sorting", "operation", "depends", "on", "priority", "of", "the", "elements" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L247-L294
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.fillArguments
public void fillArguments(@Nonnull @MustNotContainNull final List<ExpressionTree> arguments) { assertNotEmptySlot(); if (arguments == null) { throw new PreprocessorException("[Expression]Argument list is null", this.sourceString, this.includeStack, null); } if (childElements.length != arguments....
java
public void fillArguments(@Nonnull @MustNotContainNull final List<ExpressionTree> arguments) { assertNotEmptySlot(); if (arguments == null) { throw new PreprocessorException("[Expression]Argument list is null", this.sourceString, this.includeStack, null); } if (childElements.length != arguments....
[ "public", "void", "fillArguments", "(", "@", "Nonnull", "@", "MustNotContainNull", "final", "List", "<", "ExpressionTree", ">", "arguments", ")", "{", "assertNotEmptySlot", "(", ")", ";", "if", "(", "arguments", "==", "null", ")", "{", "throw", "new", "Prepr...
It fills children slots from a list containing expression trees @param arguments the list containing trees to be used as children
[ "It", "fills", "children", "slots", "from", "a", "list", "containing", "expression", "trees" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L310-L340
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.addElementToNextFreeSlot
private void addElementToNextFreeSlot(@Nonnull final ExpressionTreeElement element) { if (element == null) { throw new PreprocessorException("[Expression]Element is null", this.sourceString, this.includeStack, null); } if (childElements.length == 0) { throw new PreprocessorException("[Expressio...
java
private void addElementToNextFreeSlot(@Nonnull final ExpressionTreeElement element) { if (element == null) { throw new PreprocessorException("[Expression]Element is null", this.sourceString, this.includeStack, null); } if (childElements.length == 0) { throw new PreprocessorException("[Expressio...
[ "private", "void", "addElementToNextFreeSlot", "(", "@", "Nonnull", "final", "ExpressionTreeElement", "element", ")", "{", "if", "(", "element", "==", "null", ")", "{", "throw", "new", "PreprocessorException", "(", "\"[Expression]Element is null\"", ",", "this", "."...
Add an expression element into the next free child slot @param element an element to be added, must not be null
[ "Add", "an", "expression", "element", "into", "the", "next", "free", "child", "slot" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L347-L360
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.postProcess
public void postProcess() { if (!this.isEmptySlot()) { switch (savedItem.getExpressionItemType()) { case OPERATOR: { if (savedItem == OPERATOR_SUB) { if (!childElements[0].isEmptySlot() && childElements[1].isEmptySlot()) { final ExpressionTreeElement left = childEl...
java
public void postProcess() { if (!this.isEmptySlot()) { switch (savedItem.getExpressionItemType()) { case OPERATOR: { if (savedItem == OPERATOR_SUB) { if (!childElements[0].isEmptySlot() && childElements[1].isEmptySlot()) { final ExpressionTreeElement left = childEl...
[ "public", "void", "postProcess", "(", ")", "{", "if", "(", "!", "this", ".", "isEmptySlot", "(", ")", ")", "{", "switch", "(", "savedItem", ".", "getExpressionItemType", "(", ")", ")", "{", "case", "OPERATOR", ":", "{", "if", "(", "savedItem", "==", ...
Post-processing after the tree is formed, the unary minus operation will be optimized
[ "Post", "-", "processing", "after", "the", "tree", "is", "formed", "the", "unary", "minus", "operation", "will", "be", "optimized" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L365-L423
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/functions/AbstractFunction.java
AbstractFunction.findForClass
@Nullable public static <E extends AbstractFunction> E findForClass(@Nonnull final Class<E> functionClass) { E result = null; for (final AbstractFunction function : getAllFunctions()) { if (function.getClass() == functionClass) { result = functionClass.cast(function); break; } ...
java
@Nullable public static <E extends AbstractFunction> E findForClass(@Nonnull final Class<E> functionClass) { E result = null; for (final AbstractFunction function : getAllFunctions()) { if (function.getClass() == functionClass) { result = functionClass.cast(function); break; } ...
[ "@", "Nullable", "public", "static", "<", "E", "extends", "AbstractFunction", ">", "E", "findForClass", "(", "@", "Nonnull", "final", "Class", "<", "E", ">", "functionClass", ")", "{", "E", "result", "=", "null", ";", "for", "(", "final", "AbstractFunction...
Allows to find a function handler instance for its class @param <E> the class of the needed function handler extends the AbstractFunction class @param functionClass the class of the needed handler, must not be null @return an instance of the needed handler or null if there is not any such one
[ "Allows", "to", "find", "a", "function", "handler", "instance", "for", "its", "class" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/functions/AbstractFunction.java#L122-L132
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.registerSpecialVariableProcessor
public void registerSpecialVariableProcessor(@Nonnull final SpecialVariableProcessor processor) { assertNotNull("Processor is null", processor); for (final String varName : processor.getVariableNames()) { assertNotNull("A Special Var name is null", varName); if (mapVariableNameToSpecialVarProcessor...
java
public void registerSpecialVariableProcessor(@Nonnull final SpecialVariableProcessor processor) { assertNotNull("Processor is null", processor); for (final String varName : processor.getVariableNames()) { assertNotNull("A Special Var name is null", varName); if (mapVariableNameToSpecialVarProcessor...
[ "public", "void", "registerSpecialVariableProcessor", "(", "@", "Nonnull", "final", "SpecialVariableProcessor", "processor", ")", "{", "assertNotNull", "(", "\"Processor is null\"", ",", "processor", ")", ";", "for", "(", "final", "String", "varName", ":", "processor"...
It allows to register a special variable processor which can process some special global variables @param processor a variable processor to be registered, it must not be null @see SpecialVariableProcessor
[ "It", "allows", "to", "register", "a", "special", "variable", "processor", "which", "can", "process", "some", "special", "global", "variables" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L269-L279
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.logInfo
public void logInfo(@Nullable final String text) { if (text != null && this.preprocessorLogger != null) { this.preprocessorLogger.info(text); } }
java
public void logInfo(@Nullable final String text) { if (text != null && this.preprocessorLogger != null) { this.preprocessorLogger.info(text); } }
[ "public", "void", "logInfo", "(", "@", "Nullable", "final", "String", "text", ")", "{", "if", "(", "text", "!=", "null", "&&", "this", ".", "preprocessorLogger", "!=", "null", ")", "{", "this", ".", "preprocessorLogger", ".", "info", "(", "text", ")", ...
Print an information into the current log @param text a String to be printed into the information log, it can be null
[ "Print", "an", "information", "into", "the", "current", "log" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L286-L290
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.logError
public void logError(@Nullable final String text) { if (text != null && this.preprocessorLogger != null) { this.preprocessorLogger.error(text); } }
java
public void logError(@Nullable final String text) { if (text != null && this.preprocessorLogger != null) { this.preprocessorLogger.error(text); } }
[ "public", "void", "logError", "(", "@", "Nullable", "final", "String", "text", ")", "{", "if", "(", "text", "!=", "null", "&&", "this", ".", "preprocessorLogger", "!=", "null", ")", "{", "this", ".", "preprocessorLogger", ".", "error", "(", "text", ")", ...
Print an information about an error into the current log @param text a String to be printed into the error log, it can be null
[ "Print", "an", "information", "about", "an", "error", "into", "the", "current", "log" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L297-L301
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.logDebug
public void logDebug(@Nullable final String text) { if (text != null && this.preprocessorLogger != null) { this.preprocessorLogger.debug(text); } }
java
public void logDebug(@Nullable final String text) { if (text != null && this.preprocessorLogger != null) { this.preprocessorLogger.debug(text); } }
[ "public", "void", "logDebug", "(", "@", "Nullable", "final", "String", "text", ")", "{", "if", "(", "text", "!=", "null", "&&", "this", ".", "preprocessorLogger", "!=", "null", ")", "{", "this", ".", "preprocessorLogger", ".", "debug", "(", "text", ")", ...
Print some debug info into the current log @param text a String to be printed into the error log, it can be null @since 6.0.1
[ "Print", "some", "debug", "info", "into", "the", "current", "log" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L309-L313
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.logWarning
public void logWarning(@Nullable final String text) { if (text != null || this.preprocessorLogger != null) { this.preprocessorLogger.warning(text); } }
java
public void logWarning(@Nullable final String text) { if (text != null || this.preprocessorLogger != null) { this.preprocessorLogger.warning(text); } }
[ "public", "void", "logWarning", "(", "@", "Nullable", "final", "String", "text", ")", "{", "if", "(", "text", "!=", "null", "||", "this", ".", "preprocessorLogger", "!=", "null", ")", "{", "this", ".", "preprocessorLogger", ".", "warning", "(", "text", "...
Print an information about a warning situation into the current log @param text a String to be printed into the warning log, it can be null
[ "Print", "an", "information", "about", "a", "warning", "situation", "into", "the", "current", "log" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L320-L324
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setSharedResource
public void setSharedResource(@Nonnull final String name, @Nonnull final Object obj) { assertNotNull("Name is null", name); assertNotNull("Object is null", obj); sharedResources.put(name, obj); }
java
public void setSharedResource(@Nonnull final String name, @Nonnull final Object obj) { assertNotNull("Name is null", name); assertNotNull("Object is null", obj); sharedResources.put(name, obj); }
[ "public", "void", "setSharedResource", "(", "@", "Nonnull", "final", "String", "name", ",", "@", "Nonnull", "final", "Object", "obj", ")", "{", "assertNotNull", "(", "\"Name is null\"", ",", "name", ")", ";", "assertNotNull", "(", "\"Object is null\"", ",", "o...
Set a shared source, it is an object saved into the inside map for a name @param name the name for the saved project, must not be null @param obj the object to be saved in, must not be null
[ "Set", "a", "shared", "source", "it", "is", "an", "object", "saved", "into", "the", "inside", "map", "for", "a", "name" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L332-L337
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.getSharedResource
@Nullable public Object getSharedResource(@Nonnull final String name) { assertNotNull("Name is null", name); return sharedResources.get(name); }
java
@Nullable public Object getSharedResource(@Nonnull final String name) { assertNotNull("Name is null", name); return sharedResources.get(name); }
[ "@", "Nullable", "public", "Object", "getSharedResource", "(", "@", "Nonnull", "final", "String", "name", ")", "{", "assertNotNull", "(", "\"Name is null\"", ",", "name", ")", ";", "return", "sharedResources", ".", "get", "(", "name", ")", ";", "}" ]
Get a shared source from inside map @param name the name of the needed object, it must not be null @return a cached object or null if it is not found
[ "Get", "a", "shared", "source", "from", "inside", "map" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L345-L349
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.removeSharedResource
@Nullable public Object removeSharedResource(@Nonnull final String name) { assertNotNull("Name is null", name); return sharedResources.remove(name); }
java
@Nullable public Object removeSharedResource(@Nonnull final String name) { assertNotNull("Name is null", name); return sharedResources.remove(name); }
[ "@", "Nullable", "public", "Object", "removeSharedResource", "(", "@", "Nonnull", "final", "String", "name", ")", "{", "assertNotNull", "(", "\"Name is null\"", ",", "name", ")", ";", "return", "sharedResources", ".", "remove", "(", "name", ")", ";", "}" ]
Remove a shared object from the inside map for its name @param name the object name, it must not be null @return removing object or null if it is not found
[ "Remove", "a", "shared", "object", "from", "the", "inside", "map", "for", "its", "name" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L357-L361
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setSources
@Nonnull public PreprocessorContext setSources(@Nonnull @MustNotContainNull final List<String> folderPaths) { this.sources.clear(); this.sources.addAll(assertDoesntContainNull(folderPaths).stream().map(x -> new SourceFolder(this.baseDir, x)).collect(Collectors.toList())); return this; }
java
@Nonnull public PreprocessorContext setSources(@Nonnull @MustNotContainNull final List<String> folderPaths) { this.sources.clear(); this.sources.addAll(assertDoesntContainNull(folderPaths).stream().map(x -> new SourceFolder(this.baseDir, x)).collect(Collectors.toList())); return this; }
[ "@", "Nonnull", "public", "PreprocessorContext", "setSources", "(", "@", "Nonnull", "@", "MustNotContainNull", "final", "List", "<", "String", ">", "folderPaths", ")", "{", "this", ".", "sources", ".", "clear", "(", ")", ";", "this", ".", "sources", ".", "...
Set source directories @param folderPaths list of source folder paths represented as strings @return this preprocessor context instance
[ "Set", "source", "directories" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L369-L374
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setExtensions
@Nonnull public PreprocessorContext setExtensions(@Nonnull @MustNotContainNull final List<String> extensions) { this.extensions = new HashSet<>(assertDoesntContainNull(extensions)); return this; }
java
@Nonnull public PreprocessorContext setExtensions(@Nonnull @MustNotContainNull final List<String> extensions) { this.extensions = new HashSet<>(assertDoesntContainNull(extensions)); return this; }
[ "@", "Nonnull", "public", "PreprocessorContext", "setExtensions", "(", "@", "Nonnull", "@", "MustNotContainNull", "final", "List", "<", "String", ">", "extensions", ")", "{", "this", ".", "extensions", "=", "new", "HashSet", "<>", "(", "assertDoesntContainNull", ...
Set file extensions of files to be preprocessed, it is a comma separated list @param extensions comma separated extensions list of file extensions to be preprocessed, must not be null @return this preprocessor context
[ "Set", "file", "extensions", "of", "files", "to", "be", "preprocessed", "it", "is", "a", "comma", "separated", "list" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L393-L397
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.isFileAllowedForPreprocessing
public final boolean isFileAllowedForPreprocessing(@Nullable final File file) { boolean result = false; if (file != null && file.isFile() && file.length() != 0L) { result = this.extensions.contains(PreprocessorUtils.getFileExtension(file)); } return result; }
java
public final boolean isFileAllowedForPreprocessing(@Nullable final File file) { boolean result = false; if (file != null && file.isFile() && file.length() != 0L) { result = this.extensions.contains(PreprocessorUtils.getFileExtension(file)); } return result; }
[ "public", "final", "boolean", "isFileAllowedForPreprocessing", "(", "@", "Nullable", "final", "File", "file", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "file", "!=", "null", "&&", "file", ".", "isFile", "(", ")", "&&", "file", ".", "le...
Check that a file is allowed to be preprocessed fo its extension @param file a file to be checked @return true if the file is allowed, false otherwise
[ "Check", "that", "a", "file", "is", "allowed", "to", "be", "preprocessed", "fo", "its", "extension" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L405-L411
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.isFileExcludedByExtension
public final boolean isFileExcludedByExtension(@Nullable final File file) { return file == null || !file.isFile() || this.excludeExtensions.contains(PreprocessorUtils.getFileExtension(file)); }
java
public final boolean isFileExcludedByExtension(@Nullable final File file) { return file == null || !file.isFile() || this.excludeExtensions.contains(PreprocessorUtils.getFileExtension(file)); }
[ "public", "final", "boolean", "isFileExcludedByExtension", "(", "@", "Nullable", "final", "File", "file", ")", "{", "return", "file", "==", "null", "||", "!", "file", ".", "isFile", "(", ")", "||", "this", ".", "excludeExtensions", ".", "contains", "(", "P...
Check that a file is excluded from preprocessing and coping actions @param file a file to be checked @return true if th file must be excluded, otherwise false
[ "Check", "that", "a", "file", "is", "excluded", "from", "preprocessing", "and", "coping", "actions" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L419-L421
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setExcludeExtensions
@Nonnull public PreprocessorContext setExcludeExtensions(@Nonnull @MustNotContainNull final List<String> extensions) { this.excludeExtensions = new HashSet<>(assertDoesntContainNull(extensions)); return this; }
java
@Nonnull public PreprocessorContext setExcludeExtensions(@Nonnull @MustNotContainNull final List<String> extensions) { this.excludeExtensions = new HashSet<>(assertDoesntContainNull(extensions)); return this; }
[ "@", "Nonnull", "public", "PreprocessorContext", "setExcludeExtensions", "(", "@", "Nonnull", "@", "MustNotContainNull", "final", "List", "<", "String", ">", "extensions", ")", "{", "this", ".", "excludeExtensions", "=", "new", "HashSet", "<>", "(", "assertDoesntC...
Set comma separated list of file extensions to be excluded from preprocessing @param extensions a comma separated file extension list, it must not be null @return this preprocessor context
[ "Set", "comma", "separated", "list", "of", "file", "extensions", "to", "be", "excluded", "from", "preprocessing" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L439-L443
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setLocalVariable
@Nonnull public PreprocessorContext setLocalVariable(@Nonnull final String name, @Nonnull final Value value) { assertNotNull("Variable name is null", name); assertNotNull("Value is null", value); final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.i...
java
@Nonnull public PreprocessorContext setLocalVariable(@Nonnull final String name, @Nonnull final Value value) { assertNotNull("Variable name is null", name); assertNotNull("Value is null", value); final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.i...
[ "@", "Nonnull", "public", "PreprocessorContext", "setLocalVariable", "(", "@", "Nonnull", "final", "String", "name", ",", "@", "Nonnull", "final", "Value", "value", ")", "{", "assertNotNull", "(", "\"Variable name is null\"", ",", "name", ")", ";", "assertNotNull"...
Set a local variable value @param name the variable name, must not be null, remember that the name will be normalized and will be entirely in lower case @param value the value for the variable, it must not be null @return this preprocessor context @see Value
[ "Set", "a", "local", "variable", "value" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L453-L470
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.removeLocalVariable
@Nonnull public PreprocessorContext removeLocalVariable(@Nonnull final String name) { assertNotNull("Variable name is null", name); final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { throw makeException("Empty variable name", null); ...
java
@Nonnull public PreprocessorContext removeLocalVariable(@Nonnull final String name) { assertNotNull("Variable name is null", name); final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { throw makeException("Empty variable name", null); ...
[ "@", "Nonnull", "public", "PreprocessorContext", "removeLocalVariable", "(", "@", "Nonnull", "final", "String", "name", ")", "{", "assertNotNull", "(", "\"Variable name is null\"", ",", "name", ")", ";", "final", "String", "normalized", "=", "assertNotNull", "(", ...
Remove a local variable value from the context. @param name the variable name, must not be null, remember that the name will be normalized and will be entirely in lower case @return this preprocessor context @see Value
[ "Remove", "a", "local", "variable", "value", "from", "the", "context", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L479-L497
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.getLocalVariable
@Nullable public Value getLocalVariable(@Nullable final String name) { if (name == null) { return null; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return null; } return localVarTable.get(normalized); }
java
@Nullable public Value getLocalVariable(@Nullable final String name) { if (name == null) { return null; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return null; } return localVarTable.get(normalized); }
[ "@", "Nullable", "public", "Value", "getLocalVariable", "(", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "final", "String", "normalized", "=", "assertNotNull", "(", "Preproces...
Get a local variable value @param name the name for the variable, it can be null. The name will be normalized to allowed one. @return null either if the name is null or the variable is not found, otherwise its value
[ "Get", "a", "local", "variable", "value" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L534-L547
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.containsLocalVariable
public boolean containsLocalVariable(@Nullable final String name) { if (name == null) { return false; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return false; } return localVarTable.containsKey(normalized);...
java
public boolean containsLocalVariable(@Nullable final String name) { if (name == null) { return false; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return false; } return localVarTable.containsKey(normalized);...
[ "public", "boolean", "containsLocalVariable", "(", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "false", ";", "}", "final", "String", "normalized", "=", "assertNotNull", "(", "PreprocessorUtils", ...
Check that a local variable for a name is presented @param name the checking name, it will be normalized to the support format and can be null @return false either if the name is null or there is not any local variable for the name, otherwise true
[ "Check", "that", "a", "local", "variable", "for", "a", "name", "is", "presented" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L555-L567
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setGlobalVariable
@Nonnull public PreprocessorContext setGlobalVariable(@Nonnull final String name, @Nonnull final Value value) { assertNotNull("Variable name is null", name); final String normalizedName = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalizedName.isEmpty()) { throw makeExcept...
java
@Nonnull public PreprocessorContext setGlobalVariable(@Nonnull final String name, @Nonnull final Value value) { assertNotNull("Variable name is null", name); final String normalizedName = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalizedName.isEmpty()) { throw makeExcept...
[ "@", "Nonnull", "public", "PreprocessorContext", "setGlobalVariable", "(", "@", "Nonnull", "final", "String", "name", ",", "@", "Nonnull", "final", "Value", "value", ")", "{", "assertNotNull", "(", "\"Variable name is null\"", ",", "name", ")", ";", "final", "St...
Set a global variable value @param name the variable name, it must not be null and will be normalized to the supported format @param value the variable value, it must not be null @return this preprocessor context
[ "Set", "a", "global", "variable", "value" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L587-L613
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.containsGlobalVariable
public boolean containsGlobalVariable(@Nullable final String name) { if (name == null) { return false; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return false; } return mapVariableNameToSpecialVarProcessor.c...
java
public boolean containsGlobalVariable(@Nullable final String name) { if (name == null) { return false; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return false; } return mapVariableNameToSpecialVarProcessor.c...
[ "public", "boolean", "containsGlobalVariable", "(", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "false", ";", "}", "final", "String", "normalized", "=", "assertNotNull", "(", "PreprocessorUtils", ...
Check that there is a named global variable in the inside storage @param name the checking name, it will be normalized to the supported format, it can be null @return true if such variable is presented for its name in the inside storage, otherwise false (also it is false if the name is null)
[ "Check", "that", "there", "is", "a", "named", "global", "variable", "in", "the", "inside", "storage" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L621-L632
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.isGlobalVariable
public boolean isGlobalVariable(@Nullable final String variableName) { boolean result = false; if (variableName != null) { final String normalized = PreprocessorUtils.normalizeVariableName(variableName); result = this.globalVarTable.containsKey(normalized) || mapVariableNameToSpecialVarProcessor.con...
java
public boolean isGlobalVariable(@Nullable final String variableName) { boolean result = false; if (variableName != null) { final String normalized = PreprocessorUtils.normalizeVariableName(variableName); result = this.globalVarTable.containsKey(normalized) || mapVariableNameToSpecialVarProcessor.con...
[ "public", "boolean", "isGlobalVariable", "(", "@", "Nullable", "final", "String", "variableName", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "variableName", "!=", "null", ")", "{", "final", "String", "normalized", "=", "PreprocessorUtils", "....
Check that there is a global variable with such name. @param variableName a name to be checked, can be null @return false if there is not such variable or it is null, true if such global or special variable exists
[ "Check", "that", "there", "is", "a", "global", "variable", "with", "such", "name", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L680-L687
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.isLocalVariable
public boolean isLocalVariable(@Nullable final String variableName) { boolean result = false; if (variableName != null) { final String normalized = PreprocessorUtils.normalizeVariableName(variableName); result = this.localVarTable.containsKey(normalized); } return result; }
java
public boolean isLocalVariable(@Nullable final String variableName) { boolean result = false; if (variableName != null) { final String normalized = PreprocessorUtils.normalizeVariableName(variableName); result = this.localVarTable.containsKey(normalized); } return result; }
[ "public", "boolean", "isLocalVariable", "(", "@", "Nullable", "final", "String", "variableName", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "variableName", "!=", "null", ")", "{", "final", "String", "normalized", "=", "PreprocessorUtils", "."...
Check that there is a local variable with such name. @param variableName a name to be checked, can be null @return false if there is not such variable or it is null, true if such local variable exists
[ "Check", "that", "there", "is", "a", "local", "variable", "with", "such", "name", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L695-L702
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.createDestinationFileForPath
@Nonnull public File createDestinationFileForPath(@Nonnull final String path) { assertNotNull("Path is null", path); if (path.isEmpty()) { throw makeException("File name is empty", null); } return new File(this.getTarget(), path); }
java
@Nonnull public File createDestinationFileForPath(@Nonnull final String path) { assertNotNull("Path is null", path); if (path.isEmpty()) { throw makeException("File name is empty", null); } return new File(this.getTarget(), path); }
[ "@", "Nonnull", "public", "File", "createDestinationFileForPath", "(", "@", "Nonnull", "final", "String", "path", ")", "{", "assertNotNull", "(", "\"Path is null\"", ",", "path", ")", ";", "if", "(", "path", ".", "isEmpty", "(", ")", ")", "{", "throw", "ma...
It allows to create a File object for its path subject to the destination directory path @param path the path to the file, it must not be null @return a generated File object for the path
[ "It", "allows", "to", "create", "a", "File", "object", "for", "its", "path", "subject", "to", "the", "destination", "directory", "path" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L710-L719
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.findFileInSources
@Nonnull public File findFileInSources(@Nullable final String path) throws IOException { if (path == null) { throw makeException("File path is null", null); } if (path.trim().isEmpty()) { throw makeException("File path is empty", null); } File result = null; final TextFileDataCo...
java
@Nonnull public File findFileInSources(@Nullable final String path) throws IOException { if (path == null) { throw makeException("File path is null", null); } if (path.trim().isEmpty()) { throw makeException("File path is empty", null); } File result = null; final TextFileDataCo...
[ "@", "Nonnull", "public", "File", "findFileInSources", "(", "@", "Nullable", "final", "String", "path", ")", "throws", "IOException", "{", "if", "(", "path", "==", "null", ")", "{", "throw", "makeException", "(", "\"File path is null\"", ",", "null", ")", ";...
Finds file in source folders, the file can be found only inside source folders and external placement is disabled for security purposes. @param path the file path to find, it must not be null and must be existing file @return detected file object for the path, must not be null @throws IOException if it is impossible t...
[ "Finds", "file", "in", "source", "folders", "the", "file", "can", "be", "found", "only", "inside", "source", "folders", "and", "external", "placement", "is", "disabled", "for", "security", "purposes", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L728-L784
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.fail
@Nonnull public static Error fail(@Nullable final String message) { final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "failed")); MetaErrorListeners.fireError("Asserion error", error); if (true) { throw error; } return error; }
java
@Nonnull public static Error fail(@Nullable final String message) { final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "failed")); MetaErrorListeners.fireError("Asserion error", error); if (true) { throw error; } return error; }
[ "@", "Nonnull", "public", "static", "Error", "fail", "(", "@", "Nullable", "final", "String", "message", ")", "{", "final", "AssertionError", "error", "=", "new", "AssertionError", "(", "GetUtils", ".", "ensureNonNull", "(", "message", ",", "\"failed\"", ")", ...
Throw assertion error for some cause @param message description of the cause. @return generated error, but it throws AssertionError before return so that the value just for IDE. @throws AssertionError will be thrown @since 1.0
[ "Throw", "assertion", "error", "for", "some", "cause" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L56-L64
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertDoesntContainNull
@Nonnull public static <T> T[] assertDoesntContainNull(@Nonnull final T[] array) { assertNotNull(array); for (final T obj : array) { if (obj == null) { final AssertionError error = new AssertionError("Array must not contain NULL"); MetaErrorListeners.fireError("Asserion error", error); ...
java
@Nonnull public static <T> T[] assertDoesntContainNull(@Nonnull final T[] array) { assertNotNull(array); for (final T obj : array) { if (obj == null) { final AssertionError error = new AssertionError("Array must not contain NULL"); MetaErrorListeners.fireError("Asserion error", error); ...
[ "@", "Nonnull", "public", "static", "<", "T", ">", "T", "[", "]", "assertDoesntContainNull", "(", "@", "Nonnull", "final", "T", "[", "]", "array", ")", "{", "assertNotNull", "(", "array", ")", ";", "for", "(", "final", "T", "obj", ":", "array", ")", ...
Assert that array doesn't contain null value. @param <T> type of the object to check @param array an array to be checked for null value @return the same input parameter if all is ok @throws AssertionError it will be thrown if either array is null or it contains null @since 1.0
[ "Assert", "that", "array", "doesn", "t", "contain", "null", "value", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L144-L155
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertTrue
public static void assertTrue(@Nullable final String message, final boolean condition) { if (!condition) { final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "Condition must be TRUE")); MetaErrorListeners.fireError(error.getMessage(), error); throw error; } }
java
public static void assertTrue(@Nullable final String message, final boolean condition) { if (!condition) { final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "Condition must be TRUE")); MetaErrorListeners.fireError(error.getMessage(), error); throw error; } }
[ "public", "static", "void", "assertTrue", "(", "@", "Nullable", "final", "String", "message", ",", "final", "boolean", "condition", ")", "{", "if", "(", "!", "condition", ")", "{", "final", "AssertionError", "error", "=", "new", "AssertionError", "(", "GetUt...
Assert condition flag is TRUE. GEL will be notified about error. @param message message describing situation @param condition condition which must be true @throws AssertionError if the condition is not true @since 1.0
[ "Assert", "condition", "flag", "is", "TRUE", ".", "GEL", "will", "be", "notified", "about", "error", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L165-L171
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertEquals
public static <T> T assertEquals(@Nullable final T etalon, @Nullable final T value) { if (etalon == null) { assertNull(value); } else { if (!(etalon == value || etalon.equals(value))) { final AssertionError error = new AssertionError("Value is not equal to etalon"); MetaErrorListener...
java
public static <T> T assertEquals(@Nullable final T etalon, @Nullable final T value) { if (etalon == null) { assertNull(value); } else { if (!(etalon == value || etalon.equals(value))) { final AssertionError error = new AssertionError("Value is not equal to etalon"); MetaErrorListener...
[ "public", "static", "<", "T", ">", "T", "assertEquals", "(", "@", "Nullable", "final", "T", "etalon", ",", "@", "Nullable", "final", "T", "value", ")", "{", "if", "(", "etalon", "==", "null", ")", "{", "assertNull", "(", "value", ")", ";", "}", "el...
Assert that value is equal to some etalon value. @param <T> type of object to be checked. @param etalon etalon value @param value value to check @return value if it is equal to etalon @throws AssertionError if the value id not equal to the etalon @since 1.1.1
[ "Assert", "that", "value", "is", "equal", "to", "some", "etalon", "value", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L183-L194
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertDoesntContainNull
@Nonnull public static <T extends Collection<?>> T assertDoesntContainNull(@Nonnull final T collection) { assertNotNull(collection); for (final Object obj : collection) { assertNotNull(obj); } return collection; }
java
@Nonnull public static <T extends Collection<?>> T assertDoesntContainNull(@Nonnull final T collection) { assertNotNull(collection); for (final Object obj : collection) { assertNotNull(obj); } return collection; }
[ "@", "Nonnull", "public", "static", "<", "T", "extends", "Collection", "<", "?", ">", ">", "T", "assertDoesntContainNull", "(", "@", "Nonnull", "final", "T", "collection", ")", "{", "assertNotNull", "(", "collection", ")", ";", "for", "(", "final", "Object...
Assert that collection doesn't contain null value. @param <T> type of collection to check @param collection a collection to be checked for null value @return the same input parameter if all is ok @throws AssertionError it will be thrown if either collection is null or it contains null @since 1.0
[ "Assert", "that", "collection", "doesn", "t", "contain", "null", "value", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L221-L228
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertNotDisposed
@Nonnull public static <T extends Disposable> T assertNotDisposed(@Nonnull final T disposable) { if (disposable.isDisposed()) { final AlreadyDisposedError error = new AlreadyDisposedError("Object already disposed"); MetaErrorListeners.fireError("Asserion error", error); throw error; } re...
java
@Nonnull public static <T extends Disposable> T assertNotDisposed(@Nonnull final T disposable) { if (disposable.isDisposed()) { final AlreadyDisposedError error = new AlreadyDisposedError("Object already disposed"); MetaErrorListeners.fireError("Asserion error", error); throw error; } re...
[ "@", "Nonnull", "public", "static", "<", "T", "extends", "Disposable", ">", "T", "assertNotDisposed", "(", "@", "Nonnull", "final", "T", "disposable", ")", "{", "if", "(", "disposable", ".", "isDisposed", "(", ")", ")", "{", "final", "AlreadyDisposedError", ...
Assert that a disposable object is not disposed. @param <T> type of the object @param disposable disposable object to be checked @return the disposable object if it is not disposed yet @throws AlreadyDisposedError it will be thrown if the object is already disposed; @since 1.0
[ "Assert", "that", "a", "disposable", "object", "is", "not", "disposed", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L239-L247
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTree.java
ExpressionTree.addItem
public void addItem(@Nonnull final ExpressionItem item) { if (item == null) { throw new PreprocessorException("[Expression]Item is null", this.sources, this.includeStack, null); } if (last.isEmptySlot()) { last = new ExpressionTreeElement(item, this.includeStack, this.sources); } else { ...
java
public void addItem(@Nonnull final ExpressionItem item) { if (item == null) { throw new PreprocessorException("[Expression]Item is null", this.sources, this.includeStack, null); } if (last.isEmptySlot()) { last = new ExpressionTreeElement(item, this.includeStack, this.sources); } else { ...
[ "public", "void", "addItem", "(", "@", "Nonnull", "final", "ExpressionItem", "item", ")", "{", "if", "(", "item", "==", "null", ")", "{", "throw", "new", "PreprocessorException", "(", "\"[Expression]Item is null\"", ",", "this", ".", "sources", ",", "this", ...
Add new expression item into tree @param item an item to be added, must not be null
[ "Add", "new", "expression", "item", "into", "tree" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTree.java#L68-L78
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTree.java
ExpressionTree.addTree
public void addTree(@Nonnull final ExpressionTree tree) { assertNotNull("Tree is null", tree); if (last.isEmptySlot()) { final ExpressionTreeElement thatTreeRoot = tree.getRoot(); if (!thatTreeRoot.isEmptySlot()) { last = thatTreeRoot; last.makeMaxPriority(); } } else { ...
java
public void addTree(@Nonnull final ExpressionTree tree) { assertNotNull("Tree is null", tree); if (last.isEmptySlot()) { final ExpressionTreeElement thatTreeRoot = tree.getRoot(); if (!thatTreeRoot.isEmptySlot()) { last = thatTreeRoot; last.makeMaxPriority(); } } else { ...
[ "public", "void", "addTree", "(", "@", "Nonnull", "final", "ExpressionTree", "tree", ")", "{", "assertNotNull", "(", "\"Tree is null\"", ",", "tree", ")", ";", "if", "(", "last", ".", "isEmptySlot", "(", ")", ")", "{", "final", "ExpressionTreeElement", "that...
Add whole tree as a tree element, also it sets the maximum priority to the new element @param tree a tree to be added as an item, must not be null
[ "Add", "whole", "tree", "as", "a", "tree", "element", "also", "it", "sets", "the", "maximum", "priority", "to", "the", "new", "element" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTree.java#L85-L96
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTree.java
ExpressionTree.getRoot
@Nonnull public ExpressionTreeElement getRoot() { if (last.isEmptySlot()) { return this.last; } else { ExpressionTreeElement element = last; while (!Thread.currentThread().isInterrupted()) { final ExpressionTreeElement next = element.getParent(); if (next == null) { ...
java
@Nonnull public ExpressionTreeElement getRoot() { if (last.isEmptySlot()) { return this.last; } else { ExpressionTreeElement element = last; while (!Thread.currentThread().isInterrupted()) { final ExpressionTreeElement next = element.getParent(); if (next == null) { ...
[ "@", "Nonnull", "public", "ExpressionTreeElement", "getRoot", "(", ")", "{", "if", "(", "last", ".", "isEmptySlot", "(", ")", ")", "{", "return", "this", ".", "last", ";", "}", "else", "{", "ExpressionTreeElement", "element", "=", "last", ";", "while", "...
Get the root of the tree @return the root of the tree or EMPTY_SLOT if the tree is empty
[ "Get", "the", "root", "of", "the", "tree" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTree.java#L103-L119
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java
Deferrers.defer
@Weight(Weight.Unit.NORMAL) public static Deferred defer(@Nonnull final Deferred deferred) { REGISTRY.get().add(assertNotNull(deferred)); return deferred; }
java
@Weight(Weight.Unit.NORMAL) public static Deferred defer(@Nonnull final Deferred deferred) { REGISTRY.get().add(assertNotNull(deferred)); return deferred; }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "NORMAL", ")", "public", "static", "Deferred", "defer", "(", "@", "Nonnull", "final", "Deferred", "deferred", ")", "{", "REGISTRY", ".", "get", "(", ")", ".", "add", "(", "assertNotNull", "(", "deferred", ...
Defer some action. @param deferred action to be defer. @return the same object from arguments @since 1.0
[ "Defer", "some", "action", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java#L77-L81
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java
Deferrers.defer
@Weight(Weight.Unit.NORMAL) public static Runnable defer(@Nonnull final Runnable runnable) { assertNotNull(runnable); defer(new Deferred() { private static final long serialVersionUID = 2061489024868070733L; private final Runnable value = runnable; @Override public void executeDeferre...
java
@Weight(Weight.Unit.NORMAL) public static Runnable defer(@Nonnull final Runnable runnable) { assertNotNull(runnable); defer(new Deferred() { private static final long serialVersionUID = 2061489024868070733L; private final Runnable value = runnable; @Override public void executeDeferre...
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "NORMAL", ")", "public", "static", "Runnable", "defer", "(", "@", "Nonnull", "final", "Runnable", "runnable", ")", "{", "assertNotNull", "(", "runnable", ")", ";", "defer", "(", "new", "Deferred", "(", ")",...
Defer execution of some runnable action. @param runnable some runnable action to be executed in future @return the same runnable object from arguments. @throws AssertionError if the runnable object is null
[ "Defer", "execution", "of", "some", "runnable", "action", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java#L142-L155
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java
Deferrers.defer
@Weight(Weight.Unit.NORMAL) public static Disposable defer(@Nonnull final Disposable disposable) { assertNotNull(disposable); defer(new Deferred() { private static final long serialVersionUID = 7940162959962038010L; private final Disposable value = disposable; @Override public void ex...
java
@Weight(Weight.Unit.NORMAL) public static Disposable defer(@Nonnull final Disposable disposable) { assertNotNull(disposable); defer(new Deferred() { private static final long serialVersionUID = 7940162959962038010L; private final Disposable value = disposable; @Override public void ex...
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "NORMAL", ")", "public", "static", "Disposable", "defer", "(", "@", "Nonnull", "final", "Disposable", "disposable", ")", "{", "assertNotNull", "(", "disposable", ")", ";", "defer", "(", "new", "Deferred", "("...
Defer execution of some disposable object. @param disposable some disposable object to be processed. @return the same object from arguments @throws AssertionError if the disposable object is null @see Disposable
[ "Defer", "execution", "of", "some", "disposable", "object", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java#L165-L178
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java
Deferrers.cancelAllDeferredActionsGlobally
@Weight(Weight.Unit.NORMAL) public static void cancelAllDeferredActionsGlobally() { final List<Deferred> list = REGISTRY.get(); list.clear(); REGISTRY.remove(); }
java
@Weight(Weight.Unit.NORMAL) public static void cancelAllDeferredActionsGlobally() { final List<Deferred> list = REGISTRY.get(); list.clear(); REGISTRY.remove(); }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "NORMAL", ")", "public", "static", "void", "cancelAllDeferredActionsGlobally", "(", ")", "{", "final", "List", "<", "Deferred", ">", "list", "=", "REGISTRY", ".", "get", "(", ")", ";", "list", ".", "clear",...
Cancel all defer actions globally. @since 1.0
[ "Cancel", "all", "defer", "actions", "globally", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java#L185-L190
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java
Deferrers.processDeferredActions
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void processDeferredActions() { final int stackDepth = ThreadUtils.stackDepth(); final List<Deferred> list = REGISTRY.get(); final Iterator<Deferred> iterator = list.iterator(); while (iterator.h...
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void processDeferredActions() { final int stackDepth = ThreadUtils.stackDepth(); final List<Deferred> list = REGISTRY.get(); final Iterator<Deferred> iterator = list.iterator(); while (iterator.h...
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "public", "static", "void", "processDeferredActions", "(", ")", "{", "final", "int", "stackDepth", "=", "ThreadUtils"...
Process all defer actions for the current stack depth level. @since 1.0
[ "Process", "all", "defer", "actions", "for", "the", "current", "stack", "depth", "level", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java#L214-L237
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java
Deferrers.isEmpty
@Weight(Weight.Unit.NORMAL) public static boolean isEmpty() { final boolean result = REGISTRY.get().isEmpty(); if (result) { REGISTRY.remove(); } return result; }
java
@Weight(Weight.Unit.NORMAL) public static boolean isEmpty() { final boolean result = REGISTRY.get().isEmpty(); if (result) { REGISTRY.remove(); } return result; }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "NORMAL", ")", "public", "static", "boolean", "isEmpty", "(", ")", "{", "final", "boolean", "result", "=", "REGISTRY", ".", "get", "(", ")", ".", "isEmpty", "(", ")", ";", "if", "(", "result", ")", "{...
Check that presented defer actions for the current thread. @return true if presented, false otherwise @since 1.0
[ "Check", "that", "presented", "defer", "actions", "for", "the", "current", "thread", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Deferrers.java#L245-L252
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionParser.java
ExpressionParser.parse
@Nonnull public ExpressionTree parse(@Nonnull final String expressionStr, @Nonnull final PreprocessorContext context) throws IOException { assertNotNull("Expression is null", expressionStr); final PushbackReader reader = new PushbackReader(new StringReader(expressionStr)); final ExpressionTree result; ...
java
@Nonnull public ExpressionTree parse(@Nonnull final String expressionStr, @Nonnull final PreprocessorContext context) throws IOException { assertNotNull("Expression is null", expressionStr); final PushbackReader reader = new PushbackReader(new StringReader(expressionStr)); final ExpressionTree result; ...
[ "@", "Nonnull", "public", "ExpressionTree", "parse", "(", "@", "Nonnull", "final", "String", "expressionStr", ",", "@", "Nonnull", "final", "PreprocessorContext", "context", ")", "throws", "IOException", "{", "assertNotNull", "(", "\"Expression is null\"", ",", "exp...
To parse an expression represented as a string and get a tree @param expressionStr the expression string to be parsed, must not be null @param context a preprocessor context to be used to get variable values @return a tree containing parsed expression @throws IOException it will be thrown if there is a problem t...
[ "To", "parse", "an", "expression", "represented", "as", "a", "string", "and", "get", "a", "tree" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionParser.java#L105-L123
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionParser.java
ExpressionParser.readExpression
@Nullable public ExpressionItem readExpression(@Nonnull final PushbackReader reader, @Nonnull final ExpressionTree tree, @Nonnull final PreprocessorContext context, final boolean insideBracket, final boolean argument) throws IOException { boolean working = true; ExpressionItem result = null; final FileP...
java
@Nullable public ExpressionItem readExpression(@Nonnull final PushbackReader reader, @Nonnull final ExpressionTree tree, @Nonnull final PreprocessorContext context, final boolean insideBracket, final boolean argument) throws IOException { boolean working = true; ExpressionItem result = null; final FileP...
[ "@", "Nullable", "public", "ExpressionItem", "readExpression", "(", "@", "Nonnull", "final", "PushbackReader", "reader", ",", "@", "Nonnull", "final", "ExpressionTree", "tree", ",", "@", "Nonnull", "final", "PreprocessorContext", "context", ",", "final", "boolean", ...
It reads an expression from a reader and fill a tree @param reader the reader to be used as the character source, must not be null @param tree the result tree to be filled by read items, must not be null @param context a preprocessor context to be used for variables @param insideBracket the flag ...
[ "It", "reads", "an", "expression", "from", "a", "reader", "and", "fill", "a", "tree" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionParser.java#L136-L194
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionParser.java
ExpressionParser.readFunction
@Nonnull private ExpressionTree readFunction(@Nonnull final AbstractFunction function, @Nonnull final PushbackReader reader, @Nonnull final PreprocessorContext context, @Nullable @MustNotContainNull final FilePositionInfo[] includeStack, @Nullable final String sources) throws IOException { final ExpressionItem ex...
java
@Nonnull private ExpressionTree readFunction(@Nonnull final AbstractFunction function, @Nonnull final PushbackReader reader, @Nonnull final PreprocessorContext context, @Nullable @MustNotContainNull final FilePositionInfo[] includeStack, @Nullable final String sources) throws IOException { final ExpressionItem ex...
[ "@", "Nonnull", "private", "ExpressionTree", "readFunction", "(", "@", "Nonnull", "final", "AbstractFunction", "function", ",", "@", "Nonnull", "final", "PushbackReader", "reader", ",", "@", "Nonnull", "final", "PreprocessorContext", "context", ",", "@", "Nullable",...
The auxiliary method allows to form a function and its arguments as a tree @param function the function which arguments will be read from the stream, must not be null @param reader the reader to be used as the character source, must not be null @param context a preprocessor context, it will be used for ...
[ "The", "auxiliary", "method", "allows", "to", "form", "a", "function", "and", "its", "arguments", "as", "a", "tree" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionParser.java#L207-L257
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.addPoint
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") // WARNING! Don't make a call from methods of the class to not break stack depth! public static void addPoint(@Nonnull final String timePointName, @Nonnull final TimeAlertListener listener) { final List<TimeData> list = R...
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") // WARNING! Don't make a call from methods of the class to not break stack depth! public static void addPoint(@Nonnull final String timePointName, @Nonnull final TimeAlertListener listener) { final List<TimeData> list = R...
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "// WARNING! Don't make a call from methods of the class to not break stack depth!", "public", "static", "void", "addPoint", "(",...
Add a named time point. @param timePointName name for the time point @param listener listener to be notified @see #checkPoint(java.lang.String) @since 1.0
[ "Add", "a", "named", "time", "point", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L105-L110
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.checkPoints
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void checkPoints() { final long time = System.currentTimeMillis(); final int stackDepth = ThreadUtils.stackDepth(); final List<TimeData> list = REGISTRY.get(); final Iterator<TimeData> iterator = ...
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void checkPoints() { final long time = System.currentTimeMillis(); final int stackDepth = ThreadUtils.stackDepth(); final List<TimeData> list = REGISTRY.get(); final Iterator<TimeData> iterator = ...
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "public", "static", "void", "checkPoints", "(", ")", "{", "final", "long", "time", "=", "System", ".", "currentTi...
Process all time points for the current stack level. @since 1.0
[ "Process", "all", "time", "points", "for", "the", "current", "stack", "level", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L154-L177
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.addGuard
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void addGuard(@Nullable final String alertMessage, @Constraint("X>0") final long maxAllowedDelayInMilliseconds, @Nullable final TimeAlertListener timeAle...
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void addGuard(@Nullable final String alertMessage, @Constraint("X>0") final long maxAllowedDelayInMilliseconds, @Nullable final TimeAlertListener timeAle...
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "public", "static", "void", "addGuard", "(", "@", "Nullable", "final", "String", "alertMessage", ",", "@", "Constra...
WARNING! Don't make a call from methods of the class to not break stack depth!
[ "WARNING!", "Don", "t", "make", "a", "call", "from", "methods", "of", "the", "class", "to", "not", "break", "stack", "depth!" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L190-L197
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.cancelAll
@Weight(Weight.Unit.NORMAL) public static void cancelAll() { final List<TimeData> list = REGISTRY.get(); list.clear(); REGISTRY.remove(); }
java
@Weight(Weight.Unit.NORMAL) public static void cancelAll() { final List<TimeData> list = REGISTRY.get(); list.clear(); REGISTRY.remove(); }
[ "@", "Weight", "(", "Weight", ".", "Unit", ".", "NORMAL", ")", "public", "static", "void", "cancelAll", "(", ")", "{", "final", "List", "<", "TimeData", ">", "list", "=", "REGISTRY", ".", "get", "(", ")", ";", "list", ".", "clear", "(", ")", ";", ...
Cancel all time watchers and time points globally for the current thread. @see #cancel() @since 1.0
[ "Cancel", "all", "time", "watchers", "and", "time", "points", "globally", "for", "the", "current", "thread", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L205-L210
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.check
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void check() { final long time = System.currentTimeMillis(); final int stackDepth = ThreadUtils.stackDepth(); final List<TimeData> list = REGISTRY.get(); final Iterator<TimeData> iterator = list....
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") public static void check() { final long time = System.currentTimeMillis(); final int stackDepth = ThreadUtils.stackDepth(); final List<TimeData> list = REGISTRY.get(); final Iterator<TimeData> iterator = list....
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "public", "static", "void", "check", "(", ")", "{", "final", "long", "time", "=", "System", ".", "currentTimeMill...
Check all registered time watchers for time bound violations. @see #addGuard(java.lang.String, long) @see #addGuard(java.lang.String, long, com.igormaznitsa.meta.common.utils.TimeGuard.TimeAlertListener) @since 1.0
[ "Check", "all", "registered", "time", "watchers", "for", "time", "bound", "violations", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L237-L280
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/operators/AbstractOperator.java
AbstractOperator.findForClass
@Nullable public static <E extends AbstractOperator> E findForClass(@Nonnull final Class<E> operatorClass) { for (final AbstractOperator operator : getAllOperators()) { if (operator.getClass() == operatorClass) { return operatorClass.cast(operator); } } return null; }
java
@Nullable public static <E extends AbstractOperator> E findForClass(@Nonnull final Class<E> operatorClass) { for (final AbstractOperator operator : getAllOperators()) { if (operator.getClass() == operatorClass) { return operatorClass.cast(operator); } } return null; }
[ "@", "Nullable", "public", "static", "<", "E", "extends", "AbstractOperator", ">", "E", "findForClass", "(", "@", "Nonnull", "final", "Class", "<", "E", ">", "operatorClass", ")", "{", "for", "(", "final", "AbstractOperator", "operator", ":", "getAllOperators"...
Find an operator handler for its class @param <E> the handler class extends AbstractOperator @param operatorClass the class to be used for search, must not be null @return an instance of the handler or null if there is not any such one
[ "Find", "an", "operator", "handler", "for", "its", "class" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/operators/AbstractOperator.java#L79-L87
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/CallTrace.java
CallTrace.restoreStackTrace
@Nonnull public String restoreStackTrace() { return "THREAD_ID : " + this.threadDescriptor + this.eol + new String(this.packed ? IOUtils.unpackData(this.stacktrace) : this.stacktrace, UTF8); }
java
@Nonnull public String restoreStackTrace() { return "THREAD_ID : " + this.threadDescriptor + this.eol + new String(this.packed ? IOUtils.unpackData(this.stacktrace) : this.stacktrace, UTF8); }
[ "@", "Nonnull", "public", "String", "restoreStackTrace", "(", ")", "{", "return", "\"THREAD_ID : \"", "+", "this", ".", "threadDescriptor", "+", "this", ".", "eol", "+", "new", "String", "(", "this", ".", "packed", "?", "IOUtils", ".", "unpackData", "(", "...
Restore stack trace as a string from inside data representation. @return the stack trace as String
[ "Restore", "stack", "trace", "as", "a", "string", "from", "inside", "data", "representation", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/CallTrace.java#L130-L133
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/templates/DisposableTemplate.java
DisposableTemplate.assertNotDisposed
protected void assertNotDisposed() { if (this.disposedFlag.get()) { final AlreadyDisposedError error = new AlreadyDisposedError("Object already disposed"); MetaErrorListeners.fireError("Detected call to disposed object", error); throw error; } }
java
protected void assertNotDisposed() { if (this.disposedFlag.get()) { final AlreadyDisposedError error = new AlreadyDisposedError("Object already disposed"); MetaErrorListeners.fireError("Detected call to disposed object", error); throw error; } }
[ "protected", "void", "assertNotDisposed", "(", ")", "{", "if", "(", "this", ".", "disposedFlag", ".", "get", "(", ")", ")", "{", "final", "AlreadyDisposedError", "error", "=", "new", "AlreadyDisposedError", "(", "\"Object already disposed\"", ")", ";", "MetaErro...
Auxiliary method to ensure that the object is not disposed. @throws AlreadyDisposedError if the object has been already disposed, with notification of the global error listeners @since 1.0
[ "Auxiliary", "method", "to", "ensure", "that", "the", "object", "is", "not", "disposed", "." ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/templates/DisposableTemplate.java#L76-L82
train
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/Expression.java
Expression.evalTree
@Nonnull public static Value evalTree(@Nonnull final ExpressionTree tree, @Nonnull final PreprocessorContext context) { final Expression exp = new Expression(context, tree); return exp.eval(context.getPreprocessingState()); }
java
@Nonnull public static Value evalTree(@Nonnull final ExpressionTree tree, @Nonnull final PreprocessorContext context) { final Expression exp = new Expression(context, tree); return exp.eval(context.getPreprocessingState()); }
[ "@", "Nonnull", "public", "static", "Value", "evalTree", "(", "@", "Nonnull", "final", "ExpressionTree", "tree", ",", "@", "Nonnull", "final", "PreprocessorContext", "context", ")", "{", "final", "Expression", "exp", "=", "new", "Expression", "(", "context", "...
Evaluate an expression tree @param tree an expression tree, it must not be null @param context a preprocessor context to be used for expression operations @return the result as a Value object, it can't be null
[ "Evaluate", "an", "expression", "tree" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/Expression.java#L99-L103
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.generateArchetypesFromGithubOrganisation
public void generateArchetypesFromGithubOrganisation(String githubOrg, File outputDir, List<String> dirs) throws IOException { GitHub github = GitHub.connectAnonymously(); GHOrganization organization = github.getOrganization(githubOrg); Objects.notNull(organization, "No github organisation found...
java
public void generateArchetypesFromGithubOrganisation(String githubOrg, File outputDir, List<String> dirs) throws IOException { GitHub github = GitHub.connectAnonymously(); GHOrganization organization = github.getOrganization(githubOrg); Objects.notNull(organization, "No github organisation found...
[ "public", "void", "generateArchetypesFromGithubOrganisation", "(", "String", "githubOrg", ",", "File", "outputDir", ",", "List", "<", "String", ">", "dirs", ")", "throws", "IOException", "{", "GitHub", "github", "=", "GitHub", ".", "connectAnonymously", "(", ")", ...
Iterates through all projects in the given github organisation and generates an archetype for it
[ "Iterates", "through", "all", "projects", "in", "the", "given", "github", "organisation", "and", "generates", "an", "archetype", "for", "it" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L87-L105
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.generateArchetypesFromGitRepoList
public void generateArchetypesFromGitRepoList(File file, File outputDir, List<String> dirs) throws IOException { File cloneParentDir = new File(outputDir, "../git-clones"); if (cloneParentDir.exists()) { Files.recursiveDelete(cloneParentDir); } Properties properties = new Pr...
java
public void generateArchetypesFromGitRepoList(File file, File outputDir, List<String> dirs) throws IOException { File cloneParentDir = new File(outputDir, "../git-clones"); if (cloneParentDir.exists()) { Files.recursiveDelete(cloneParentDir); } Properties properties = new Pr...
[ "public", "void", "generateArchetypesFromGitRepoList", "(", "File", "file", ",", "File", "outputDir", ",", "List", "<", "String", ">", "dirs", ")", "throws", "IOException", "{", "File", "cloneParentDir", "=", "new", "File", "(", "outputDir", ",", "\"../git-clone...
Iterates through all projects in the given properties file adn generate an archetype for it
[ "Iterates", "through", "all", "projects", "in", "the", "given", "properties", "file", "adn", "generate", "an", "archetype", "for", "it" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L110-L127
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.generateArchetypes
public void generateArchetypes(String containerType, File baseDir, File outputDir, boolean clean, List<String> dirs) throws IOException { LOG.debug("Generating archetypes from {} to {}", baseDir.getCanonicalPath(), outputDir.getCanonicalPath()); File[] files = baseDir.listFiles(); if (files != n...
java
public void generateArchetypes(String containerType, File baseDir, File outputDir, boolean clean, List<String> dirs) throws IOException { LOG.debug("Generating archetypes from {} to {}", baseDir.getCanonicalPath(), outputDir.getCanonicalPath()); File[] files = baseDir.listFiles(); if (files != n...
[ "public", "void", "generateArchetypes", "(", "String", "containerType", ",", "File", "baseDir", ",", "File", "outputDir", ",", "boolean", "clean", ",", "List", "<", "String", ">", "dirs", ")", "throws", "IOException", "{", "LOG", ".", "debug", "(", "\"Genera...
Iterates through all nested directories and generates archetypes for all found, non-pom Maven projects. @param baseDir a directory to look for projects which may be converted to Maven Archetypes @param outputDir target directory where Maven Archetype projects will be generated @param clean regenerate the archetypes (c...
[ "Iterates", "through", "all", "nested", "directories", "and", "generates", "archetypes", "for", "all", "found", "non", "-", "pom", "Maven", "projects", "." ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L196-L227
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.skipImport
private static boolean skipImport(File dir) { String[] files = dir.list(); if (files != null) { for (String name : files) { if (".skipimport".equals(name)) { return true; } } } return false; }
java
private static boolean skipImport(File dir) { String[] files = dir.list(); if (files != null) { for (String name : files) { if (".skipimport".equals(name)) { return true; } } } return false; }
[ "private", "static", "boolean", "skipImport", "(", "File", "dir", ")", "{", "String", "[", "]", "files", "=", "dir", ".", "list", "(", ")", ";", "if", "(", "files", "!=", "null", ")", "{", "for", "(", "String", "name", ":", "files", ")", "{", "if...
We should skip importing some quickstarts and if so, we should also not create an archetype for it
[ "We", "should", "skip", "importing", "some", "quickstarts", "and", "if", "so", "we", "should", "also", "not", "create", "an", "archetype", "for", "it" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L232-L243
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.fileIncludesLine
private boolean fileIncludesLine(File file, String matches) throws IOException { for (String line: Files.readLines(file)) { String trimmed = line.trim(); if (trimmed.equals(matches)) { return true; } } return false; }
java
private boolean fileIncludesLine(File file, String matches) throws IOException { for (String line: Files.readLines(file)) { String trimmed = line.trim(); if (trimmed.equals(matches)) { return true; } } return false; }
[ "private", "boolean", "fileIncludesLine", "(", "File", "file", ",", "String", "matches", ")", "throws", "IOException", "{", "for", "(", "String", "line", ":", "Files", ".", "readLines", "(", "file", ")", ")", "{", "String", "trimmed", "=", "line", ".", "...
Checks whether the file contains specific line. Partial matches do not count.
[ "Checks", "whether", "the", "file", "contains", "specific", "line", ".", "Partial", "matches", "do", "not", "count", "." ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L683-L691
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.copyOtherFiles
protected void copyOtherFiles(File projectDir, File srcDir, File outDir, Replacement replaceFn, Set<String> extraIgnorefiles) throws IOException { if (archetypeUtils.isValidFileToCopy(projectDir, srcDir, extraIgnorefiles)) { if (srcDir.isFile()) { copyFile(srcDir, outDir, replaceFn);...
java
protected void copyOtherFiles(File projectDir, File srcDir, File outDir, Replacement replaceFn, Set<String> extraIgnorefiles) throws IOException { if (archetypeUtils.isValidFileToCopy(projectDir, srcDir, extraIgnorefiles)) { if (srcDir.isFile()) { copyFile(srcDir, outDir, replaceFn);...
[ "protected", "void", "copyOtherFiles", "(", "File", "projectDir", ",", "File", "srcDir", ",", "File", "outDir", ",", "Replacement", "replaceFn", ",", "Set", "<", "String", ">", "extraIgnorefiles", ")", "throws", "IOException", "{", "if", "(", "archetypeUtils", ...
Copies all other source files which are not excluded
[ "Copies", "all", "other", "source", "files", "which", "are", "not", "excluded" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L749-L763
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.isSourceFile
protected boolean isSourceFile(File file) { String name = file.getName(); String extension = Files.getExtension(name).toLowerCase(); return sourceFileExtensions.contains(extension) || sourceFileNames.contains(name); }
java
protected boolean isSourceFile(File file) { String name = file.getName(); String extension = Files.getExtension(name).toLowerCase(); return sourceFileExtensions.contains(extension) || sourceFileNames.contains(name); }
[ "protected", "boolean", "isSourceFile", "(", "File", "file", ")", "{", "String", "name", "=", "file", ".", "getName", "(", ")", ";", "String", "extension", "=", "Files", ".", "getExtension", "(", "name", ")", ".", "toLowerCase", "(", ")", ";", "return", ...
Returns true if this file is a valid source file name
[ "Returns", "true", "if", "this", "file", "is", "a", "valid", "source", "file", "name" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L768-L772
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.isValidRequiredPropertyName
protected boolean isValidRequiredPropertyName(String name) { return !name.equals("basedir") && !name.startsWith("project.") && !name.startsWith("pom.") && !name.equals("package"); }
java
protected boolean isValidRequiredPropertyName(String name) { return !name.equals("basedir") && !name.startsWith("project.") && !name.startsWith("pom.") && !name.equals("package"); }
[ "protected", "boolean", "isValidRequiredPropertyName", "(", "String", "name", ")", "{", "return", "!", "name", ".", "equals", "(", "\"basedir\"", ")", "&&", "!", "name", ".", "startsWith", "(", "\"project.\"", ")", "&&", "!", "name", ".", "startsWith", "(", ...
Returns true if this is a valid archetype property name, so excluding basedir and maven "project." names
[ "Returns", "true", "if", "this", "is", "a", "valid", "archetype", "property", "name", "so", "excluding", "basedir", "and", "maven", "project", ".", "names" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L777-L779
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java
ArchetypeBuilder.isSpecialPropertyName
protected boolean isSpecialPropertyName(String name) { for (String special : specialVersions) { if (special.equals(name)) { return true; } } return false; }
java
protected boolean isSpecialPropertyName(String name) { for (String special : specialVersions) { if (special.equals(name)) { return true; } } return false; }
[ "protected", "boolean", "isSpecialPropertyName", "(", "String", "name", ")", "{", "for", "(", "String", "special", ":", "specialVersions", ")", "{", "if", "(", "special", ".", "equals", "(", "name", ")", ")", "{", "return", "true", ";", "}", "}", "return...
Returns true if its a special property name such as Camel, ActiveMQ etc.
[ "Returns", "true", "if", "its", "a", "special", "property", "name", "such", "as", "Camel", "ActiveMQ", "etc", "." ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/ArchetypeBuilder.java#L784-L791
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/PomValidator.java
PomValidator.addPropertyElement
private boolean addPropertyElement(Element element, String elementName, String textContent) { Document doc = element.getOwnerDocument(); Element newElement = doc.createElement(elementName); newElement.setTextContent(textContent); Text textNode = doc.createTextNode("\n "); Nod...
java
private boolean addPropertyElement(Element element, String elementName, String textContent) { Document doc = element.getOwnerDocument(); Element newElement = doc.createElement(elementName); newElement.setTextContent(textContent); Text textNode = doc.createTextNode("\n "); Nod...
[ "private", "boolean", "addPropertyElement", "(", "Element", "element", ",", "String", "elementName", ",", "String", "textContent", ")", "{", "Document", "doc", "=", "element", ".", "getOwnerDocument", "(", ")", ";", "Element", "newElement", "=", "doc", ".", "c...
Lets add a child element at the right place
[ "Lets", "add", "a", "child", "element", "at", "the", "right", "place" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/builder/PomValidator.java#L219-L245
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/generator/ArchetypeHelper.java
ArchetypeHelper.removeInvalidHeaderCommentsAndProcessVelocityMacros
protected String removeInvalidHeaderCommentsAndProcessVelocityMacros(String text) { String answer = ""; String[] lines = text.split("\r?\n"); for (String line : lines) { String l = line.trim(); // a bit of Velocity here if (!l.startsWith("##") && !l.startsWith...
java
protected String removeInvalidHeaderCommentsAndProcessVelocityMacros(String text) { String answer = ""; String[] lines = text.split("\r?\n"); for (String line : lines) { String l = line.trim(); // a bit of Velocity here if (!l.startsWith("##") && !l.startsWith...
[ "protected", "String", "removeInvalidHeaderCommentsAndProcessVelocityMacros", "(", "String", "text", ")", "{", "String", "answer", "=", "\"\"", ";", "String", "[", "]", "lines", "=", "text", ".", "split", "(", "\"\\r?\\n\"", ")", ";", "for", "(", "String", "li...
This method should do a full Velocity macro processing...
[ "This", "method", "should", "do", "a", "full", "Velocity", "macro", "processing", "..." ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/generator/ArchetypeHelper.java#L311-L326
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java
ArchetypeUtils.findRootPackage
public File findRootPackage(File directory) throws IOException { if (!directory.isDirectory()) { throw new IllegalArgumentException("Can't find package inside file. Argument should be valid directory."); } File[] children = directory.listFiles(new FileFilter() { @Override...
java
public File findRootPackage(File directory) throws IOException { if (!directory.isDirectory()) { throw new IllegalArgumentException("Can't find package inside file. Argument should be valid directory."); } File[] children = directory.listFiles(new FileFilter() { @Override...
[ "public", "File", "findRootPackage", "(", "File", "directory", ")", "throws", "IOException", "{", "if", "(", "!", "directory", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Can't find package inside file. Argument should b...
Recursively looks for first nested directory which contains at least one source file @param directory @return
[ "Recursively", "looks", "for", "first", "nested", "directory", "which", "contains", "at", "least", "one", "source", "file" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java#L105-L137
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java
ArchetypeUtils.isValidSourceFileOrDir
public boolean isValidSourceFileOrDir(File file) { String name = file.getName(); return !isExcludedDotFile(name) && !excludeExtensions.contains(Files.getExtension(file.getName())); }
java
public boolean isValidSourceFileOrDir(File file) { String name = file.getName(); return !isExcludedDotFile(name) && !excludeExtensions.contains(Files.getExtension(file.getName())); }
[ "public", "boolean", "isValidSourceFileOrDir", "(", "File", "file", ")", "{", "String", "name", "=", "file", ".", "getName", "(", ")", ";", "return", "!", "isExcludedDotFile", "(", "name", ")", "&&", "!", "excludeExtensions", ".", "contains", "(", "Files", ...
Returns true if this file is a valid source file; so excluding things like .svn directories and whatnot
[ "Returns", "true", "if", "this", "file", "is", "a", "valid", "source", "file", ";", "so", "excluding", "things", "like", ".", "svn", "directories", "and", "whatnot" ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java#L143-L146
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java
ArchetypeUtils.writeXmlDocument
public void writeXmlDocument(Document document, File file) throws IOException { try { Transformer tr = transformerFactory.newTransformer(); tr.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); tr.setOutputProperty(OutputKeys.INDENT, "yes"); FileOutputStream fileOut...
java
public void writeXmlDocument(Document document, File file) throws IOException { try { Transformer tr = transformerFactory.newTransformer(); tr.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); tr.setOutputProperty(OutputKeys.INDENT, "yes"); FileOutputStream fileOut...
[ "public", "void", "writeXmlDocument", "(", "Document", "document", ",", "File", "file", ")", "throws", "IOException", "{", "try", "{", "Transformer", "tr", "=", "transformerFactory", ".", "newTransformer", "(", ")", ";", "tr", ".", "setOutputProperty", "(", "O...
Serializes the Document to a File.
[ "Serializes", "the", "Document", "to", "a", "File", "." ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java#L201-L212
train
fabric8io/ipaas-quickstarts
archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java
ArchetypeUtils.writeXmlDocumentAsString
public String writeXmlDocumentAsString(Document document) throws IOException { try { Transformer tr = transformerFactory.newTransformer(); tr.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); tr.setOutputProperty(OutputKeys.INDENT, "yes"); StringWriter writer = new...
java
public String writeXmlDocumentAsString(Document document) throws IOException { try { Transformer tr = transformerFactory.newTransformer(); tr.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); tr.setOutputProperty(OutputKeys.INDENT, "yes"); StringWriter writer = new...
[ "public", "String", "writeXmlDocumentAsString", "(", "Document", "document", ")", "throws", "IOException", "{", "try", "{", "Transformer", "tr", "=", "transformerFactory", ".", "newTransformer", "(", ")", ";", "tr", ".", "setOutputProperty", "(", "OutputKeys", "."...
Serializes the Document to a String.
[ "Serializes", "the", "Document", "to", "a", "String", "." ]
cf9a9aa09204a82ac996304ab8c96791f7e5db22
https://github.com/fabric8io/ipaas-quickstarts/blob/cf9a9aa09204a82ac996304ab8c96791f7e5db22/archetype-builder/src/main/java/io/fabric8/tooling/archetype/ArchetypeUtils.java#L217-L230
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/Validate.java
Validate.notNull
public static void notNull(final Object object, final String argumentName) { if (object == null) { throw new NullPointerException(getMessage("null", argumentName)); } }
java
public static void notNull(final Object object, final String argumentName) { if (object == null) { throw new NullPointerException(getMessage("null", argumentName)); } }
[ "public", "static", "void", "notNull", "(", "final", "Object", "object", ",", "final", "String", "argumentName", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "getMessage", "(", "\"null\"", ",", "argument...
Validates that the supplied object is not null, and throws a NullPointerException otherwise. @param object The object to validate for {@code null}-ness. @param argumentName The argument name of the object to validate. If supplied (i.e. non-{@code null}), this value is used in composing a better exception message...
[ "Validates", "that", "the", "supplied", "object", "is", "not", "null", "and", "throws", "a", "NullPointerException", "otherwise", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/Validate.java#L43-L47
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/Validate.java
Validate.notEmpty
public static void notEmpty(final String aString, final String argumentName) { // Check sanity notNull(aString, argumentName); if (aString.length() == 0) { throw new IllegalArgumentException(getMessage("empty", argumentName)); } }
java
public static void notEmpty(final String aString, final String argumentName) { // Check sanity notNull(aString, argumentName); if (aString.length() == 0) { throw new IllegalArgumentException(getMessage("empty", argumentName)); } }
[ "public", "static", "void", "notEmpty", "(", "final", "String", "aString", ",", "final", "String", "argumentName", ")", "{", "// Check sanity", "notNull", "(", "aString", ",", "argumentName", ")", ";", "if", "(", "aString", ".", "length", "(", ")", "==", "...
Validates that the supplied object is not null, and throws an IllegalArgumentException otherwise. @param aString The string to validate for emptyness. @param argumentName The argument name of the object to validate. If supplied (i.e. non-{@code null}), this value is used in composing a better exception message.
[ "Validates", "that", "the", "supplied", "object", "is", "not", "null", "and", "throws", "an", "IllegalArgumentException", "otherwise", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/Validate.java#L57-L65
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/schemaenhancement/ChangeFilenameProcessor.java
ChangeFilenameProcessor.getNamespace
private String getNamespace(final Attr attribute) { final Element parent = attribute.getOwnerElement(); return parent.getAttribute(NAMESPACE); }
java
private String getNamespace(final Attr attribute) { final Element parent = attribute.getOwnerElement(); return parent.getAttribute(NAMESPACE); }
[ "private", "String", "getNamespace", "(", "final", "Attr", "attribute", ")", "{", "final", "Element", "parent", "=", "attribute", ".", "getOwnerElement", "(", ")", ";", "return", "parent", ".", "getAttribute", "(", "NAMESPACE", ")", ";", "}" ]
Retrieves the value of the "namespace" attribute found within the parent element of the provided attribute. @param attribute An attribute defined within the parent holding the "namespace" attribute. @return The value of the "namespace" attribute.
[ "Retrieves", "the", "value", "of", "the", "namespace", "attribute", "found", "within", "the", "parent", "element", "of", "the", "provided", "attribute", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/schemaenhancement/ChangeFilenameProcessor.java#L120-L123
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/LoggingHandlerEnvironmentFacet.java
LoggingHandlerEnvironmentFacet.restore
public void restore() { if (!restored) { // Remove the extra Handler from the RootLogger rootLogger.removeHandler(mavenLogHandler); // Restore the original state to the Root logger rootLogger.setLevel(originalRootLoggerLevel); for (Handler current :...
java
public void restore() { if (!restored) { // Remove the extra Handler from the RootLogger rootLogger.removeHandler(mavenLogHandler); // Restore the original state to the Root logger rootLogger.setLevel(originalRootLoggerLevel); for (Handler current :...
[ "public", "void", "restore", "(", ")", "{", "if", "(", "!", "restored", ")", "{", "// Remove the extra Handler from the RootLogger", "rootLogger", ".", "removeHandler", "(", "mavenLogHandler", ")", ";", "// Restore the original state to the Root logger", "rootLogger", "."...
Restores the original root Logger state, including Level and Handlers.
[ "Restores", "the", "original", "root", "Logger", "state", "including", "Level", "and", "Handlers", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/LoggingHandlerEnvironmentFacet.java#L116-L132
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/LoggingHandlerEnvironmentFacet.java
LoggingHandlerEnvironmentFacet.create
public static LoggingHandlerEnvironmentFacet create(final Log mavenLog, final Class<? extends AbstractJaxbMojo> caller, final String encoding) { // Check sanity Validate.notNull(mavenLog, "ma...
java
public static LoggingHandlerEnvironmentFacet create(final Log mavenLog, final Class<? extends AbstractJaxbMojo> caller, final String encoding) { // Check sanity Validate.notNull(mavenLog, "ma...
[ "public", "static", "LoggingHandlerEnvironmentFacet", "create", "(", "final", "Log", "mavenLog", ",", "final", "Class", "<", "?", "extends", "AbstractJaxbMojo", ">", "caller", ",", "final", "String", "encoding", ")", "{", "// Check sanity", "Validate", ".", "notNu...
Factory method creating a new LoggingHandlerEnvironmentFacet wrapping the supplied properties. @param mavenLog The active Maven Log. @param caller The AbstractJaxbMojo subclass which invoked this LoggingHandlerEnvironmentFacet factory method. @param encoding The encoding used by the Maven Mojo subclass. @return A fu...
[ "Factory", "method", "creating", "a", "new", "LoggingHandlerEnvironmentFacet", "wrapping", "the", "supplied", "properties", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/LoggingHandlerEnvironmentFacet.java#L142-L158
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java
ThreadContextClassLoaderBuilder.addURL
public ThreadContextClassLoaderBuilder addURL(final URL anURL) { // Check sanity Validate.notNull(anURL, "anURL"); // Add the segment unless already added. for (URL current : urlList) { if (current.toString().equalsIgnoreCase(anURL.toString())) { if (log.is...
java
public ThreadContextClassLoaderBuilder addURL(final URL anURL) { // Check sanity Validate.notNull(anURL, "anURL"); // Add the segment unless already added. for (URL current : urlList) { if (current.toString().equalsIgnoreCase(anURL.toString())) { if (log.is...
[ "public", "ThreadContextClassLoaderBuilder", "addURL", "(", "final", "URL", "anURL", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "anURL", ",", "\"anURL\"", ")", ";", "// Add the segment unless already added.", "for", "(", "URL", "current", ":", "ur...
Adds the supplied anURL to the list of internal URLs which should be used to build an URLClassLoader. Will only add an URL once, and warns about trying to re-add an URL. @param anURL The URL to add. @return This ThreadContextClassLoaderBuilder, for builder pattern chaining.
[ "Adds", "the", "supplied", "anURL", "to", "the", "list", "of", "internal", "URLs", "which", "should", "be", "used", "to", "build", "an", "URLClassLoader", ".", "Will", "only", "add", "an", "URL", "once", "and", "warns", "about", "trying", "to", "re", "-"...
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java#L112-L148
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java
ThreadContextClassLoaderBuilder.createFor
public static ThreadContextClassLoaderBuilder createFor(final ClassLoader classLoader, final Log log, final String encoding) { // Check sanity Validate.notNull(classLoader, "classLoad...
java
public static ThreadContextClassLoaderBuilder createFor(final ClassLoader classLoader, final Log log, final String encoding) { // Check sanity Validate.notNull(classLoader, "classLoad...
[ "public", "static", "ThreadContextClassLoaderBuilder", "createFor", "(", "final", "ClassLoader", "classLoader", ",", "final", "Log", "log", ",", "final", "String", "encoding", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "classLoader", ",", "\"class...
Creates a new ThreadContextClassLoaderBuilder using the supplied original classLoader, as well as the supplied Maven Log. @param classLoader The original ClassLoader which should be used as the parent for the ThreadContext ClassLoader produced by the ThreadContextClassLoaderBuilder generated by this builder method. Ca...
[ "Creates", "a", "new", "ThreadContextClassLoaderBuilder", "using", "the", "supplied", "original", "classLoader", "as", "well", "as", "the", "supplied", "Maven", "Log", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java#L253-L263
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java
ThreadContextClassLoaderBuilder.createFor
public static ThreadContextClassLoaderBuilder createFor(final Class<?> aClass, final Log log, final String encoding) { // Check sanity Validate.notNull(aClass, "aClass"); // ...
java
public static ThreadContextClassLoaderBuilder createFor(final Class<?> aClass, final Log log, final String encoding) { // Check sanity Validate.notNull(aClass, "aClass"); // ...
[ "public", "static", "ThreadContextClassLoaderBuilder", "createFor", "(", "final", "Class", "<", "?", ">", "aClass", ",", "final", "Log", "log", ",", "final", "String", "encoding", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "aClass", ",", "\"...
Creates a new ThreadContextClassLoaderBuilder using the original ClassLoader from the supplied Class, as well as the given Maven Log. @param aClass A non-null class from which to extract the original ClassLoader. @param log The active Maven Log. Cannot be null. @param encoding The encoding used by Maven. Cannot...
[ "Creates", "a", "new", "ThreadContextClassLoaderBuilder", "using", "the", "original", "ClassLoader", "from", "the", "supplied", "Class", "as", "well", "as", "the", "given", "Maven", "Log", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java#L274-L283
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java
ThreadContextClassLoaderBuilder.getClassPathElement
public static String getClassPathElement(final URL anURL, final String encoding) throws IllegalArgumentException { // Check sanity Validate.notNull(anURL, "anURL"); final String protocol = anURL.getProtocol(); String toReturn = null; if (FILE.supports(protocol)) { ...
java
public static String getClassPathElement(final URL anURL, final String encoding) throws IllegalArgumentException { // Check sanity Validate.notNull(anURL, "anURL"); final String protocol = anURL.getProtocol(); String toReturn = null; if (FILE.supports(protocol)) { ...
[ "public", "static", "String", "getClassPathElement", "(", "final", "URL", "anURL", ",", "final", "String", "encoding", ")", "throws", "IllegalArgumentException", "{", "// Check sanity", "Validate", ".", "notNull", "(", "anURL", ",", "\"anURL\"", ")", ";", "final",...
Converts the supplied URL to a class path element. @param anURL The non-null URL for which to acquire a classPath element. @param encoding The encoding used by Maven. @return The full (i.e. non-chopped) classpath element corresponding to the supplied URL. @throws java.lang.IllegalArgumentException if the supplied U...
[ "Converts", "the", "supplied", "URL", "to", "a", "class", "path", "element", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java#L293-L322
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DefaultJavaDocRenderer.java
DefaultJavaDocRenderer.renderJavaDocTag
protected String renderJavaDocTag(final String name, final String value, final SortableLocation location) { final String nameKey = name != null ? name.trim() : ""; final String valueKey = value != null ? value.trim() : ""; // All Done. return "(" + nameKey + "): " + harmonizeNewlines(va...
java
protected String renderJavaDocTag(final String name, final String value, final SortableLocation location) { final String nameKey = name != null ? name.trim() : ""; final String valueKey = value != null ? value.trim() : ""; // All Done. return "(" + nameKey + "): " + harmonizeNewlines(va...
[ "protected", "String", "renderJavaDocTag", "(", "final", "String", "name", ",", "final", "String", "value", ",", "final", "SortableLocation", "location", ")", "{", "final", "String", "nameKey", "=", "name", "!=", "null", "?", "name", ".", "trim", "(", ")", ...
Override this method to yield another @param name The name of a JavaDoc tag. @param value The value of a JavaDoc tag. @param location the SortableLocation where the JavaDocData was harvested. Never {@code null}. @return The XSD documentation for the supplied JavaDoc tag.
[ "Override", "this", "method", "to", "yield", "another" ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DefaultJavaDocRenderer.java#L81-L87
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DefaultJavaDocRenderer.java
DefaultJavaDocRenderer.harmonizeNewlines
protected String harmonizeNewlines(final String original) { final String toReturn = original.trim().replaceAll("[\r\n]+", "\n"); return toReturn.endsWith("\n") ? toReturn : toReturn + "\n"; }
java
protected String harmonizeNewlines(final String original) { final String toReturn = original.trim().replaceAll("[\r\n]+", "\n"); return toReturn.endsWith("\n") ? toReturn : toReturn + "\n"; }
[ "protected", "String", "harmonizeNewlines", "(", "final", "String", "original", ")", "{", "final", "String", "toReturn", "=", "original", ".", "trim", "(", ")", ".", "replaceAll", "(", "\"[\\r\\n]+\"", ",", "\"\\n\"", ")", ";", "return", "toReturn", ".", "en...
Squashes newline characters into @param original the original string, potentially containing newline characters. @return A string where all newline characters are removed
[ "Squashes", "newline", "characters", "into" ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DefaultJavaDocRenderer.java#L95-L99
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java
AbstractJaxbMojo.warnAboutIncorrectPluginConfiguration
@SuppressWarnings("all") protected void warnAboutIncorrectPluginConfiguration(final String propertyName, final String description) { final StringBuilder builder = new StringBuilder(); builder.append("\n+=================== [Incorrect Plugin Configuration Detected]\n"); builder.append("|\n")...
java
@SuppressWarnings("all") protected void warnAboutIncorrectPluginConfiguration(final String propertyName, final String description) { final StringBuilder builder = new StringBuilder(); builder.append("\n+=================== [Incorrect Plugin Configuration Detected]\n"); builder.append("|\n")...
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "protected", "void", "warnAboutIncorrectPluginConfiguration", "(", "final", "String", "propertyName", ",", "final", "String", "description", ")", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ...
Convenience method to invoke when some plugin configuration is incorrect. Will output the problem as a warning with some degree of log formatting. @param propertyName The name of the problematic property. @param description The problem description.
[ "Convenience", "method", "to", "invoke", "when", "some", "plugin", "configuration", "is", "incorrect", ".", "Will", "output", "the", "problem", "as", "a", "warning", "with", "some", "degree", "of", "log", "formatting", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java#L417-L428
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java
AbstractJaxbMojo.getStaleFile
protected final File getStaleFile() { final String staleFileName = "." + (getExecution() == null ? "nonExecutionJaxb" : getExecution().getExecutionId()) + "-" + getStaleFileName(); return new File(staleFileDirectory, staleFileName); }
java
protected final File getStaleFile() { final String staleFileName = "." + (getExecution() == null ? "nonExecutionJaxb" : getExecution().getExecutionId()) + "-" + getStaleFileName(); return new File(staleFileDirectory, staleFileName); }
[ "protected", "final", "File", "getStaleFile", "(", ")", "{", "final", "String", "staleFileName", "=", "\".\"", "+", "(", "getExecution", "(", ")", "==", "null", "?", "\"nonExecutionJaxb\"", ":", "getExecution", "(", ")", ".", "getExecutionId", "(", ")", ")",...
Acquires the staleFile for this execution @return the staleFile (used to define where) for this execution
[ "Acquires", "the", "staleFile", "for", "this", "execution" ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java#L472-L477
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java
AbstractJaxbMojo.logSystemPropertiesAndBasedir
protected void logSystemPropertiesAndBasedir() { if (getLog().isDebugEnabled()) { final StringBuilder builder = new StringBuilder(); builder.append("\n+=================== [System properties]\n"); builder.append("|\n"); // Sort the system properties ...
java
protected void logSystemPropertiesAndBasedir() { if (getLog().isDebugEnabled()) { final StringBuilder builder = new StringBuilder(); builder.append("\n+=================== [System properties]\n"); builder.append("|\n"); // Sort the system properties ...
[ "protected", "void", "logSystemPropertiesAndBasedir", "(", ")", "{", "if", "(", "getLog", "(", ")", ".", "isDebugEnabled", "(", ")", ")", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "...
Prints out the system properties to the Maven Log at Debug level.
[ "Prints", "out", "the", "system", "properties", "to", "the", "Maven", "Log", "at", "Debug", "level", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java#L668-L693
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/locale/LocaleFacet.java
LocaleFacet.createFor
public static LocaleFacet createFor(final String localeString, final Log log) throws MojoExecutionException { // Check sanity Validate.notNull(log, "log"); Validate.notEmpty(localeString, "localeString"); final StringTokenizer tok = new StringTokenizer(localeString, ",", false); ...
java
public static LocaleFacet createFor(final String localeString, final Log log) throws MojoExecutionException { // Check sanity Validate.notNull(log, "log"); Validate.notEmpty(localeString, "localeString"); final StringTokenizer tok = new StringTokenizer(localeString, ",", false); ...
[ "public", "static", "LocaleFacet", "createFor", "(", "final", "String", "localeString", ",", "final", "Log", "log", ")", "throws", "MojoExecutionException", "{", "// Check sanity", "Validate", ".", "notNull", "(", "log", ",", "\"log\"", ")", ";", "Validate", "."...
Helper method used to parse a locale configuration string into a Locale instance. @param localeString A configuration string parameter on the form {@code &lt;language&gt;[,&lt;country&gt;[,&lt;variant&gt;]]} @param log The active Maven Log. Cannot be null. @return A fully constructed Locale. @throws MojoExecu...
[ "Helper", "method", "used", "to", "parse", "a", "locale", "configuration", "string", "into", "a", "Locale", "instance", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/locale/LocaleFacet.java#L107-L127
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/MavenLogHandler.java
MavenLogHandler.getJavaUtilLoggingLevelFor
public static Level getJavaUtilLoggingLevelFor(final Log mavenLog) { // Check sanity Validate.notNull(mavenLog, "mavenLog"); Level toReturn = Level.SEVERE; if (mavenLog.isDebugEnabled()) { toReturn = Level.FINER; } else if (mavenLog.isInfoEnabled()) { t...
java
public static Level getJavaUtilLoggingLevelFor(final Log mavenLog) { // Check sanity Validate.notNull(mavenLog, "mavenLog"); Level toReturn = Level.SEVERE; if (mavenLog.isDebugEnabled()) { toReturn = Level.FINER; } else if (mavenLog.isInfoEnabled()) { t...
[ "public", "static", "Level", "getJavaUtilLoggingLevelFor", "(", "final", "Log", "mavenLog", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "mavenLog", ",", "\"mavenLog\"", ")", ";", "Level", "toReturn", "=", "Level", ".", "SEVERE", ";", "if", "(...
Retrieves the JUL Level matching the supplied Maven Log. @param mavenLog A non-null Maven Log. @return The Corresponding JUL Level.
[ "Retrieves", "the", "JUL", "Level", "matching", "the", "supplied", "Maven", "Log", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/MavenLogHandler.java#L129-L146
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/MavenLogHandler.java
MavenLogHandler.getLoggingFilter
public static Filter getLoggingFilter(final String... requiredPrefixes) { // Check sanity Validate.notNull(requiredPrefixes, "requiredPrefixes"); // All done. return new Filter() { // Internal state private List<String> requiredPrefs = Arrays.asList(requiredPre...
java
public static Filter getLoggingFilter(final String... requiredPrefixes) { // Check sanity Validate.notNull(requiredPrefixes, "requiredPrefixes"); // All done. return new Filter() { // Internal state private List<String> requiredPrefs = Arrays.asList(requiredPre...
[ "public", "static", "Filter", "getLoggingFilter", "(", "final", "String", "...", "requiredPrefixes", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "requiredPrefixes", ",", "\"requiredPrefixes\"", ")", ";", "// All done.", "return", "new", "Filter", "...
Retrieves a java.util.Logging filter used to ensure that only LogRecords whose logger names start with any of the required prefixes are logged. @param requiredPrefixes A non-null list of prefixes to be matched with the LogRecord logger names. @return A java.util.logging Filter that only permits logging LogRecords whos...
[ "Retrieves", "a", "java", ".", "util", ".", "Logging", "filter", "used", "to", "ensure", "that", "only", "LogRecords", "whose", "logger", "names", "start", "with", "any", "of", "the", "required", "prefixes", "are", "logged", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/MavenLogHandler.java#L156-L181
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java
DomHelper.isNamedElement
public static boolean isNamedElement(final Node aNode) { final boolean isElementNode = aNode != null && aNode.getNodeType() == Node.ELEMENT_NODE; return isElementNode && getNamedAttribute(aNode, NAME_ATTRIBUTE) != null && !getNamedAttribute(aNode, NAME_ATTRIBUTE).isEmpt...
java
public static boolean isNamedElement(final Node aNode) { final boolean isElementNode = aNode != null && aNode.getNodeType() == Node.ELEMENT_NODE; return isElementNode && getNamedAttribute(aNode, NAME_ATTRIBUTE) != null && !getNamedAttribute(aNode, NAME_ATTRIBUTE).isEmpt...
[ "public", "static", "boolean", "isNamedElement", "(", "final", "Node", "aNode", ")", "{", "final", "boolean", "isElementNode", "=", "aNode", "!=", "null", "&&", "aNode", ".", "getNodeType", "(", ")", "==", "Node", ".", "ELEMENT_NODE", ";", "return", "isEleme...
Checks if the supplied DOM Node is a DOM Element having a defined "name" attribute. @param aNode A DOM Node. @return {@code true} if the supplied aNode is an Elemnet having a defined "name" attribute.
[ "Checks", "if", "the", "supplied", "DOM", "Node", "is", "a", "DOM", "Element", "having", "a", "defined", "name", "attribute", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java#L92-L99
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java
DomHelper.getElementTagName
public static String getElementTagName(final Node aNode) { if (aNode != null && aNode.getNodeType() == Node.ELEMENT_NODE) { final Element theElement = (Element) aNode; return theElement.getTagName(); } // The Node was not an Element. return null; }
java
public static String getElementTagName(final Node aNode) { if (aNode != null && aNode.getNodeType() == Node.ELEMENT_NODE) { final Element theElement = (Element) aNode; return theElement.getTagName(); } // The Node was not an Element. return null; }
[ "public", "static", "String", "getElementTagName", "(", "final", "Node", "aNode", ")", "{", "if", "(", "aNode", "!=", "null", "&&", "aNode", ".", "getNodeType", "(", ")", "==", "Node", ".", "ELEMENT_NODE", ")", "{", "final", "Element", "theElement", "=", ...
Retrieves the TagName for the supplied Node if it is an Element, and null otherwise. @param aNode A DOM Node. @return The TagName of the Node if it is an Element, and null otherwise.
[ "Retrieves", "the", "TagName", "for", "the", "supplied", "Node", "if", "it", "is", "an", "Element", "and", "null", "otherwise", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java#L107-L117
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java
DomHelper.getXPathFor
public static String getXPathFor(final Node aNode) { List<String> nodeNameList = new ArrayList<String>(); for (Node current = aNode; current != null; current = current.getParentNode()) { final String currentNodeName = current.getNodeName(); final String nameAttribute = DomHelp...
java
public static String getXPathFor(final Node aNode) { List<String> nodeNameList = new ArrayList<String>(); for (Node current = aNode; current != null; current = current.getParentNode()) { final String currentNodeName = current.getNodeName(); final String nameAttribute = DomHelp...
[ "public", "static", "String", "getXPathFor", "(", "final", "Node", "aNode", ")", "{", "List", "<", "String", ">", "nodeNameList", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "Node", "current", "=", "aNode", ";", "current", "...
Retrieves the XPath for the supplied Node within its document. @param aNode The DOM Node for which the XPath should be retrieved. @return The XPath to the supplied DOM Node.
[ "Retrieves", "the", "XPath", "for", "the", "supplied", "Node", "within", "its", "document", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java#L170-L205
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java
DomHelper.getClassLocation
public static ClassLocation getClassLocation(final Node aNode, final Set<ClassLocation> classLocations) { if (aNode != null) { // The LocalName of the supplied DOM Node should be either "complexType" or "simpleType". final String nodeLocalName = aNode.getLocalName(); final...
java
public static ClassLocation getClassLocation(final Node aNode, final Set<ClassLocation> classLocations) { if (aNode != null) { // The LocalName of the supplied DOM Node should be either "complexType" or "simpleType". final String nodeLocalName = aNode.getLocalName(); final...
[ "public", "static", "ClassLocation", "getClassLocation", "(", "final", "Node", "aNode", ",", "final", "Set", "<", "ClassLocation", ">", "classLocations", ")", "{", "if", "(", "aNode", "!=", "null", ")", "{", "// The LocalName of the supplied DOM Node should be either ...
Retrieves the ClassLocation for the supplied aNode. @param aNode A non-null DOM Node. @param classLocations The set of known ClassLocations, extracted from the JavaDocs. @return the ClassLocation matching the supplied Node
[ "Retrieves", "the", "ClassLocation", "for", "the", "supplied", "aNode", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java#L214-L244
train
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java
DomHelper.getMethodLocation
public static MethodLocation getMethodLocation(final Node aNode, final Set<MethodLocation> methodLocations) { MethodLocation toReturn = null; if (aNode != null && CLASS_FIELD_METHOD_ELEMENT_NAMES.contains(aNode.getLocalName().toLowerCase())) { final MethodLocation validLocation = getField...
java
public static MethodLocation getMethodLocation(final Node aNode, final Set<MethodLocation> methodLocations) { MethodLocation toReturn = null; if (aNode != null && CLASS_FIELD_METHOD_ELEMENT_NAMES.contains(aNode.getLocalName().toLowerCase())) { final MethodLocation validLocation = getField...
[ "public", "static", "MethodLocation", "getMethodLocation", "(", "final", "Node", "aNode", ",", "final", "Set", "<", "MethodLocation", ">", "methodLocations", ")", "{", "MethodLocation", "toReturn", "=", "null", ";", "if", "(", "aNode", "!=", "null", "&&", "CLA...
Finds the MethodLocation within the given Set, which corresponds to the supplied DOM Node. @param aNode A DOM Node. @param methodLocations The Set of all found/known MethodLocation instances. @return The MethodLocation matching the supplied Node - or {@code null} if no match was found.
[ "Finds", "the", "MethodLocation", "within", "the", "given", "Set", "which", "corresponds", "to", "the", "supplied", "DOM", "Node", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DomHelper.java#L253-L272
train