id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
129,900 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java | ConcurrentLinkedHashMap.drainOnReadIfNeeded | void drainOnReadIfNeeded(int bufferIndex, long writeCount) {
final long pending = (writeCount - readBufferDrainAtWriteCount[bufferIndex].get());
final boolean delayable = (pending < READ_BUFFER_THRESHOLD);
final DrainStatus status = drainStatus.get();
if (status.shouldDrainBuffers(delaya... | java | void drainOnReadIfNeeded(int bufferIndex, long writeCount) {
final long pending = (writeCount - readBufferDrainAtWriteCount[bufferIndex].get());
final boolean delayable = (pending < READ_BUFFER_THRESHOLD);
final DrainStatus status = drainStatus.get();
if (status.shouldDrainBuffers(delaya... | [
"void",
"drainOnReadIfNeeded",
"(",
"int",
"bufferIndex",
",",
"long",
"writeCount",
")",
"{",
"final",
"long",
"pending",
"=",
"(",
"writeCount",
"-",
"readBufferDrainAtWriteCount",
"[",
"bufferIndex",
"]",
".",
"get",
"(",
")",
")",
";",
"final",
"boolean",
... | Attempts to drain the buffers if it is determined to be needed when
post-processing a read.
@param bufferIndex the index to the chosen read buffer
@param writeCount the number of writes on the chosen read buffer | [
"Attempts",
"to",
"drain",
"the",
"buffers",
"if",
"it",
"is",
"determined",
"to",
"be",
"needed",
"when",
"post",
"-",
"processing",
"a",
"read",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java#L381-L388 |
129,901 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java | ConcurrentLinkedHashMap.drainReadBuffers | @GuardedBy("evictionLock")
void drainReadBuffers() {
final int start = (int) Thread.currentThread().getId();
final int end = start + NUMBER_OF_READ_BUFFERS;
for (int i = start; i < end; i++) {
drainReadBuffer(i & READ_BUFFERS_MASK);
}
} | java | @GuardedBy("evictionLock")
void drainReadBuffers() {
final int start = (int) Thread.currentThread().getId();
final int end = start + NUMBER_OF_READ_BUFFERS;
for (int i = start; i < end; i++) {
drainReadBuffer(i & READ_BUFFERS_MASK);
}
} | [
"@",
"GuardedBy",
"(",
"\"evictionLock\"",
")",
"void",
"drainReadBuffers",
"(",
")",
"{",
"final",
"int",
"start",
"=",
"(",
"int",
")",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getId",
"(",
")",
";",
"final",
"int",
"end",
"=",
"start",
"+",
... | Drains the read buffers, each up to an amortized threshold. | [
"Drains",
"the",
"read",
"buffers",
"each",
"up",
"to",
"an",
"amortized",
"threshold",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java#L426-L433 |
129,902 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java | ConcurrentLinkedHashMap.drainWriteBuffer | @GuardedBy("evictionLock")
void drainWriteBuffer() {
for (int i = 0; i < WRITE_BUFFER_DRAIN_THRESHOLD; i++) {
final Runnable task = writeBuffer.poll();
if (task == null) {
break;
}
task.run();
}
} | java | @GuardedBy("evictionLock")
void drainWriteBuffer() {
for (int i = 0; i < WRITE_BUFFER_DRAIN_THRESHOLD; i++) {
final Runnable task = writeBuffer.poll();
if (task == null) {
break;
}
task.run();
}
} | [
"@",
"GuardedBy",
"(",
"\"evictionLock\"",
")",
"void",
"drainWriteBuffer",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"WRITE_BUFFER_DRAIN_THRESHOLD",
";",
"i",
"++",
")",
"{",
"final",
"Runnable",
"task",
"=",
"writeBuffer",
".",
"p... | Drains the read buffer up to an amortized threshold. | [
"Drains",
"the",
"read",
"buffer",
"up",
"to",
"an",
"amortized",
"threshold",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java#L465-L474 |
129,903 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java | ConcurrentLinkedHashMap.notifyListener | void notifyListener() {
Node<K, V> node;
while ((node = pendingNotifications.poll()) != null) {
listener.onEviction(node.key, node.getValue());
}
} | java | void notifyListener() {
Node<K, V> node;
while ((node = pendingNotifications.poll()) != null) {
listener.onEviction(node.key, node.getValue());
}
} | [
"void",
"notifyListener",
"(",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"node",
";",
"while",
"(",
"(",
"node",
"=",
"pendingNotifications",
".",
"poll",
"(",
")",
")",
"!=",
"null",
")",
"{",
"listener",
".",
"onEviction",
"(",
"node",
".",
"key... | Notifies the listener of entries that were evicted. | [
"Notifies",
"the",
"listener",
"of",
"entries",
"that",
"were",
"evicted",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java#L530-L535 |
129,904 | micronaut-projects/micronaut-core | runtime/src/main/java/io/micronaut/discovery/registration/AutoRegistration.java | AutoRegistration.validateName | protected void validateName(String name, String typeDescription) {
if (!APPLICATION_NAME_PATTERN.matcher(name).matches()) {
throw new DiscoveryException(typeDescription + " [" + name + "] must start with a letter, end with a letter or digit and contain only letters, digits or hyphens. Example: foo-b... | java | protected void validateName(String name, String typeDescription) {
if (!APPLICATION_NAME_PATTERN.matcher(name).matches()) {
throw new DiscoveryException(typeDescription + " [" + name + "] must start with a letter, end with a letter or digit and contain only letters, digits or hyphens. Example: foo-b... | [
"protected",
"void",
"validateName",
"(",
"String",
"name",
",",
"String",
"typeDescription",
")",
"{",
"if",
"(",
"!",
"APPLICATION_NAME_PATTERN",
".",
"matcher",
"(",
"name",
")",
".",
"matches",
"(",
")",
")",
"{",
"throw",
"new",
"DiscoveryException",
"(... | Validate the given application name.
@param name The application name
@param typeDescription The detailed information about name | [
"Validate",
"the",
"given",
"application",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/discovery/registration/AutoRegistration.java#L107-L111 |
129,905 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/bind/annotation/AbstractAnnotatedArgumentBinder.java | AbstractAnnotatedArgumentBinder.doBind | @SuppressWarnings("unchecked")
protected BindingResult<T> doBind(
ArgumentConversionContext<T> context,
ConvertibleValues<?> values,
String annotationValue) {
return doConvert(doResolve(context, values, annotationValue), context);
} | java | @SuppressWarnings("unchecked")
protected BindingResult<T> doBind(
ArgumentConversionContext<T> context,
ConvertibleValues<?> values,
String annotationValue) {
return doConvert(doResolve(context, values, annotationValue), context);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"BindingResult",
"<",
"T",
">",
"doBind",
"(",
"ArgumentConversionContext",
"<",
"T",
">",
"context",
",",
"ConvertibleValues",
"<",
"?",
">",
"values",
",",
"String",
"annotationValue",
")",
"{",
... | Do binding.
@param context context
@param values values
@param annotationValue annotationValue
@return result | [
"Do",
"binding",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/bind/annotation/AbstractAnnotatedArgumentBinder.java#L60-L67 |
129,906 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/bind/annotation/AbstractAnnotatedArgumentBinder.java | AbstractAnnotatedArgumentBinder.doResolve | @SuppressWarnings("unchecked")
protected @Nullable Object doResolve(
ArgumentConversionContext<T> context,
ConvertibleValues<?> values,
String annotationValue) {
Object value = resolveValue(context, values, annotationValue);
if (value == null) {
Strin... | java | @SuppressWarnings("unchecked")
protected @Nullable Object doResolve(
ArgumentConversionContext<T> context,
ConvertibleValues<?> values,
String annotationValue) {
Object value = resolveValue(context, values, annotationValue);
if (value == null) {
Strin... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"@",
"Nullable",
"Object",
"doResolve",
"(",
"ArgumentConversionContext",
"<",
"T",
">",
"context",
",",
"ConvertibleValues",
"<",
"?",
">",
"values",
",",
"String",
"annotationValue",
")",
"{",
"O... | Do resolve.
@param context context
@param values values
@param annotationValue annotationValue
@return result | [
"Do",
"resolve",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/bind/annotation/AbstractAnnotatedArgumentBinder.java#L77-L93 |
129,907 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/bind/annotation/AbstractAnnotatedArgumentBinder.java | AbstractAnnotatedArgumentBinder.doConvert | protected BindingResult<T> doConvert(Object value, ArgumentConversionContext<T> context) {
Optional<T> result = conversionService.convert(value, context);
if (result.isPresent() && context.getArgument().getType() == Optional.class) {
return () -> (Optional<T>) result.get();
}
... | java | protected BindingResult<T> doConvert(Object value, ArgumentConversionContext<T> context) {
Optional<T> result = conversionService.convert(value, context);
if (result.isPresent() && context.getArgument().getType() == Optional.class) {
return () -> (Optional<T>) result.get();
}
... | [
"protected",
"BindingResult",
"<",
"T",
">",
"doConvert",
"(",
"Object",
"value",
",",
"ArgumentConversionContext",
"<",
"T",
">",
"context",
")",
"{",
"Optional",
"<",
"T",
">",
"result",
"=",
"conversionService",
".",
"convert",
"(",
"value",
",",
"context... | Convert the value and return a binding result.
@param value The value to convert
@param context The conversion context
@return The binding result | [
"Convert",
"the",
"value",
"and",
"return",
"a",
"binding",
"result",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/bind/annotation/AbstractAnnotatedArgumentBinder.java#L120-L126 |
129,908 | micronaut-projects/micronaut-core | http/src/main/java/io/micronaut/http/context/ServerRequestContext.java | ServerRequestContext.with | public static void with(HttpRequest request, Runnable runnable) {
HttpRequest existing = REQUEST.get();
boolean isSet = false;
try {
if (request != existing) {
isSet = true;
REQUEST.set(request);
}
runnable.run();
} fina... | java | public static void with(HttpRequest request, Runnable runnable) {
HttpRequest existing = REQUEST.get();
boolean isSet = false;
try {
if (request != existing) {
isSet = true;
REQUEST.set(request);
}
runnable.run();
} fina... | [
"public",
"static",
"void",
"with",
"(",
"HttpRequest",
"request",
",",
"Runnable",
"runnable",
")",
"{",
"HttpRequest",
"existing",
"=",
"REQUEST",
".",
"get",
"(",
")",
";",
"boolean",
"isSet",
"=",
"false",
";",
"try",
"{",
"if",
"(",
"request",
"!=",... | Wrap the execution of the given runnable in request context processing.
@param request The request
@param runnable The runnable | [
"Wrap",
"the",
"execution",
"of",
"the",
"given",
"runnable",
"in",
"request",
"context",
"processing",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http/src/main/java/io/micronaut/http/context/ServerRequestContext.java#L44-L58 |
129,909 | micronaut-projects/micronaut-core | http/src/main/java/io/micronaut/http/context/ServerRequestContext.java | ServerRequestContext.currentRequest | @SuppressWarnings("unchecked")
public static <T> Optional<HttpRequest<T>> currentRequest() {
return Optional.ofNullable(REQUEST.get());
} | java | @SuppressWarnings("unchecked")
public static <T> Optional<HttpRequest<T>> currentRequest() {
return Optional.ofNullable(REQUEST.get());
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"Optional",
"<",
"HttpRequest",
"<",
"T",
">",
">",
"currentRequest",
"(",
")",
"{",
"return",
"Optional",
".",
"ofNullable",
"(",
"REQUEST",
".",
"get",
"(",
")",
")"... | Retrieve the current server request context.
@param <T> The body type
@return The request context if it is present | [
"Retrieve",
"the",
"current",
"server",
"request",
"context",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http/src/main/java/io/micronaut/http/context/ServerRequestContext.java#L126-L129 |
129,910 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.addShutdownHook | public void addShutdownHook() {
shutdownHookThread = new Thread(new Runnable() {
@Override
public void run() {
beforeShutdown();
}
});
Runtime.getRuntime().addShutdownHook(shutdownHookThread);
} | java | public void addShutdownHook() {
shutdownHookThread = new Thread(new Runnable() {
@Override
public void run() {
beforeShutdown();
}
});
Runtime.getRuntime().addShutdownHook(shutdownHookThread);
} | [
"public",
"void",
"addShutdownHook",
"(",
")",
"{",
"shutdownHookThread",
"=",
"new",
"Thread",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"beforeShutdown",
"(",
")",
";",
"}",
"}",
")",
";",
"Runtim... | Add a shutdown hook. | [
"Add",
"a",
"shutdown",
"hook",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L169-L177 |
129,911 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.reinitialize | public void reinitialize(InputStream systemIn, PrintStream systemOut, PrintStream systemErr) throws IOException {
if (reader != null) {
reader.shutdown();
}
initialize(systemIn, systemOut, systemErr);
} | java | public void reinitialize(InputStream systemIn, PrintStream systemOut, PrintStream systemErr) throws IOException {
if (reader != null) {
reader.shutdown();
}
initialize(systemIn, systemOut, systemErr);
} | [
"public",
"void",
"reinitialize",
"(",
"InputStream",
"systemIn",
",",
"PrintStream",
"systemOut",
",",
"PrintStream",
"systemErr",
")",
"throws",
"IOException",
"{",
"if",
"(",
"reader",
"!=",
"null",
")",
"{",
"reader",
".",
"shutdown",
"(",
")",
";",
"}",... | Use in testing when System.out, System.err or System.in change.
@param systemIn The system in
@param systemOut The system out
@param systemErr The system err
@throws IOException if there is an error | [
"Use",
"in",
"testing",
"when",
"System",
".",
"out",
"System",
".",
"err",
"or",
"System",
".",
"in",
"change",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L196-L201 |
129,912 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.createConsoleReader | protected ConsoleReader createConsoleReader(InputStream systemIn) throws IOException {
// need to swap out the output to avoid logging during init
final PrintStream nullOutput = new PrintStream(new ByteArrayOutputStream());
final PrintStream originalOut = Log.getOutput();
try {
... | java | protected ConsoleReader createConsoleReader(InputStream systemIn) throws IOException {
// need to swap out the output to avoid logging during init
final PrintStream nullOutput = new PrintStream(new ByteArrayOutputStream());
final PrintStream originalOut = Log.getOutput();
try {
... | [
"protected",
"ConsoleReader",
"createConsoleReader",
"(",
"InputStream",
"systemIn",
")",
"throws",
"IOException",
"{",
"// need to swap out the output to avoid logging during init",
"final",
"PrintStream",
"nullOutput",
"=",
"new",
"PrintStream",
"(",
"new",
"ByteArrayOutputSt... | Create a console reader.
@param systemIn The input stream
@return The console reader
@throws IOException if there is an error | [
"Create",
"a",
"console",
"reader",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L311-L323 |
129,913 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.createTerminal | protected Terminal createTerminal() {
terminal = TerminalFactory.create();
if (isWindows()) {
terminal.setEchoEnabled(true);
}
return terminal;
} | java | protected Terminal createTerminal() {
terminal = TerminalFactory.create();
if (isWindows()) {
terminal.setEchoEnabled(true);
}
return terminal;
} | [
"protected",
"Terminal",
"createTerminal",
"(",
")",
"{",
"terminal",
"=",
"TerminalFactory",
".",
"create",
"(",
")",
";",
"if",
"(",
"isWindows",
"(",
")",
")",
"{",
"terminal",
".",
"setEchoEnabled",
"(",
"true",
")",
";",
"}",
"return",
"terminal",
"... | Creates the instance of Terminal used directly in MicronautConsole. Note that there is also another terminal
instance created implicitly inside of ConsoleReader. That instance is controlled by the jline.terminal system
property.
@return the new {@link Terminal} | [
"Creates",
"the",
"instance",
"of",
"Terminal",
"used",
"directly",
"in",
"MicronautConsole",
".",
"Note",
"that",
"there",
"is",
"also",
"another",
"terminal",
"instance",
"created",
"implicitly",
"inside",
"of",
"ConsoleReader",
".",
"That",
"instance",
"is",
... | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L332-L338 |
129,914 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.resetCompleters | public void resetCompleters() {
final ConsoleReader reader = getReader();
if (reader != null) {
Collection<Completer> completers = reader.getCompleters();
for (Completer completer : completers) {
reader.removeCompleter(completer);
}
// for... | java | public void resetCompleters() {
final ConsoleReader reader = getReader();
if (reader != null) {
Collection<Completer> completers = reader.getCompleters();
for (Completer completer : completers) {
reader.removeCompleter(completer);
}
// for... | [
"public",
"void",
"resetCompleters",
"(",
")",
"{",
"final",
"ConsoleReader",
"reader",
"=",
"getReader",
"(",
")",
";",
"if",
"(",
"reader",
"!=",
"null",
")",
"{",
"Collection",
"<",
"Completer",
">",
"completers",
"=",
"reader",
".",
"getCompleters",
"(... | Reset the completers. | [
"Reset",
"the",
"completers",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L343-L357 |
129,915 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.prepareHistory | protected History prepareHistory() throws IOException {
File file = new File(System.getProperty("user.home"), HISTORYFILE);
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException ignored) {
// can't create the file, so no history fo... | java | protected History prepareHistory() throws IOException {
File file = new File(System.getProperty("user.home"), HISTORYFILE);
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException ignored) {
// can't create the file, so no history fo... | [
"protected",
"History",
"prepareHistory",
"(",
")",
"throws",
"IOException",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"System",
".",
"getProperty",
"(",
"\"user.home\"",
")",
",",
"HISTORYFILE",
")",
";",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
... | Prepares a history file to be used by the ConsoleReader. This file
will live in the home directory of the user.
@return The {@link History}
@throws IOException if there is an error | [
"Prepares",
"a",
"history",
"file",
"to",
"be",
"used",
"by",
"the",
"ConsoleReader",
".",
"This",
"file",
"will",
"live",
"in",
"the",
"home",
"directory",
"of",
"the",
"user",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L366-L376 |
129,916 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.removeInstance | public static synchronized void removeInstance() {
if (instance != null) {
instance.removeShutdownHook();
instance.restoreOriginalSystemOutAndErr();
if (instance.getReader() != null) {
instance.getReader().shutdown();
}
instance = null;... | java | public static synchronized void removeInstance() {
if (instance != null) {
instance.removeShutdownHook();
instance.restoreOriginalSystemOutAndErr();
if (instance.getReader() != null) {
instance.getReader().shutdown();
}
instance = null;... | [
"public",
"static",
"synchronized",
"void",
"removeInstance",
"(",
")",
"{",
"if",
"(",
"instance",
"!=",
"null",
")",
"{",
"instance",
".",
"removeShutdownHook",
"(",
")",
";",
"instance",
".",
"restoreOriginalSystemOutAndErr",
"(",
")",
";",
"if",
"(",
"in... | Remove the Micronaut console. | [
"Remove",
"the",
"Micronaut",
"console",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L417-L426 |
129,917 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.restoreTerminal | protected void restoreTerminal() {
try {
terminal.restore();
} catch (Exception e) {
// ignore
}
if (terminal instanceof UnixTerminal) {
// workaround for GRAILS-11494
try {
new TerminalLineSettings().set("sane");
... | java | protected void restoreTerminal() {
try {
terminal.restore();
} catch (Exception e) {
// ignore
}
if (terminal instanceof UnixTerminal) {
// workaround for GRAILS-11494
try {
new TerminalLineSettings().set("sane");
... | [
"protected",
"void",
"restoreTerminal",
"(",
")",
"{",
"try",
"{",
"terminal",
".",
"restore",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"// ignore",
"}",
"if",
"(",
"terminal",
"instanceof",
"UnixTerminal",
")",
"{",
"// workaround for... | Restore the terminal. | [
"Restore",
"the",
"terminal",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L439-L453 |
129,918 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.redirectSystemOutAndErr | protected void redirectSystemOutAndErr(boolean force) {
if (force || !(System.out instanceof ConsolePrintStream)) {
System.setOut(new ConsolePrintStream(out));
}
if (force || !(System.err instanceof ConsoleErrorPrintStream)) {
System.setErr(new ConsoleErrorPrintStream(err... | java | protected void redirectSystemOutAndErr(boolean force) {
if (force || !(System.out instanceof ConsolePrintStream)) {
System.setOut(new ConsolePrintStream(out));
}
if (force || !(System.err instanceof ConsoleErrorPrintStream)) {
System.setErr(new ConsoleErrorPrintStream(err... | [
"protected",
"void",
"redirectSystemOutAndErr",
"(",
"boolean",
"force",
")",
"{",
"if",
"(",
"force",
"||",
"!",
"(",
"System",
".",
"out",
"instanceof",
"ConsolePrintStream",
")",
")",
"{",
"System",
".",
"setOut",
"(",
"new",
"ConsolePrintStream",
"(",
"o... | Redirect system out and error to the console.
@param force Whether to force the redirect | [
"Redirect",
"system",
"out",
"and",
"error",
"to",
"the",
"console",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L481-L488 |
129,919 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.indicateProgress | @Override
public void indicateProgress() {
verifySystemOut();
progressIndicatorActive = true;
if (isAnsiEnabled()) {
if (lastMessage != null && lastMessage.length() > 0) {
if (!lastMessage.contains(maxIndicatorString)) {
updateStatus(lastMessag... | java | @Override
public void indicateProgress() {
verifySystemOut();
progressIndicatorActive = true;
if (isAnsiEnabled()) {
if (lastMessage != null && lastMessage.length() > 0) {
if (!lastMessage.contains(maxIndicatorString)) {
updateStatus(lastMessag... | [
"@",
"Override",
"public",
"void",
"indicateProgress",
"(",
")",
"{",
"verifySystemOut",
"(",
")",
";",
"progressIndicatorActive",
"=",
"true",
";",
"if",
"(",
"isAnsiEnabled",
"(",
")",
")",
"{",
"if",
"(",
"lastMessage",
"!=",
"null",
"&&",
"lastMessage",
... | Indicates progress with the default progress indicator. | [
"Indicates",
"progress",
"with",
"the",
"default",
"progress",
"indicator",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L620-L633 |
129,920 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.indicateProgress | @Override
public void indicateProgress(int number, int total) {
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
updateStatus(currMsg + ' ' + number + " of " + total);
} finally {
lastMessage = currMsg;
}
} | java | @Override
public void indicateProgress(int number, int total) {
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
updateStatus(currMsg + ' ' + number + " of " + total);
} finally {
lastMessage = currMsg;
}
} | [
"@",
"Override",
"public",
"void",
"indicateProgress",
"(",
"int",
"number",
",",
"int",
"total",
")",
"{",
"progressIndicatorActive",
"=",
"true",
";",
"String",
"currMsg",
"=",
"lastMessage",
";",
"try",
"{",
"updateStatus",
"(",
"currMsg",
"+",
"'",
"'",
... | Indicate progress for a number and total.
@param number The current number
@param total The total number | [
"Indicate",
"progress",
"for",
"a",
"number",
"and",
"total",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L641-L650 |
129,921 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.indicateProgressPercentage | @SuppressWarnings("MagicNumber")
@Override
public void indicateProgressPercentage(long number, long total) {
verifySystemOut();
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
int percentage = Math.round(NumberMath.multiply(NumberMath.divide(number... | java | @SuppressWarnings("MagicNumber")
@Override
public void indicateProgressPercentage(long number, long total) {
verifySystemOut();
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
int percentage = Math.round(NumberMath.multiply(NumberMath.divide(number... | [
"@",
"SuppressWarnings",
"(",
"\"MagicNumber\"",
")",
"@",
"Override",
"public",
"void",
"indicateProgressPercentage",
"(",
"long",
"number",
",",
"long",
"total",
")",
"{",
"verifySystemOut",
"(",
")",
";",
"progressIndicatorActive",
"=",
"true",
";",
"String",
... | Indicates progress as a percentage for the given number and total.
@param number The number
@param total The total | [
"Indicates",
"progress",
"as",
"a",
"percentage",
"for",
"the",
"given",
"number",
"and",
"total",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L658-L676 |
129,922 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.indicateProgress | @Override
public void indicateProgress(int number) {
verifySystemOut();
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
if (isAnsiEnabled()) {
updateStatus(currMsg + ' ' + number);
} else {
out.print("..");
... | java | @Override
public void indicateProgress(int number) {
verifySystemOut();
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
if (isAnsiEnabled()) {
updateStatus(currMsg + ' ' + number);
} else {
out.print("..");
... | [
"@",
"Override",
"public",
"void",
"indicateProgress",
"(",
"int",
"number",
")",
"{",
"verifySystemOut",
"(",
")",
";",
"progressIndicatorActive",
"=",
"true",
";",
"String",
"currMsg",
"=",
"lastMessage",
";",
"try",
"{",
"if",
"(",
"isAnsiEnabled",
"(",
"... | Indicates progress by number.
@param number The number | [
"Indicates",
"progress",
"by",
"number",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L683-L698 |
129,923 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.error | @Override
public void error(String msg, Throwable error) {
try {
if ((verbose || stacktrace) && error != null) {
printStackTrace(msg, error);
error(ERROR, msg);
} else {
error(ERROR, msg + STACKTRACE_MESSAGE);
}
} fi... | java | @Override
public void error(String msg, Throwable error) {
try {
if ((verbose || stacktrace) && error != null) {
printStackTrace(msg, error);
error(ERROR, msg);
} else {
error(ERROR, msg + STACKTRACE_MESSAGE);
}
} fi... | [
"@",
"Override",
"public",
"void",
"error",
"(",
"String",
"msg",
",",
"Throwable",
"error",
")",
"{",
"try",
"{",
"if",
"(",
"(",
"verbose",
"||",
"stacktrace",
")",
"&&",
"error",
"!=",
"null",
")",
"{",
"printStackTrace",
"(",
"msg",
",",
"error",
... | Use to log an error.
@param msg The message
@param error The error | [
"Use",
"to",
"log",
"an",
"error",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L821-L833 |
129,924 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.log | @Override
public void log(String msg) {
verifySystemOut();
PrintStream printStream = out;
try {
if (userInputActive) {
erasePrompt(printStream);
}
if (msg.endsWith(LINE_SEPARATOR)) {
printStream.print(msg);
} els... | java | @Override
public void log(String msg) {
verifySystemOut();
PrintStream printStream = out;
try {
if (userInputActive) {
erasePrompt(printStream);
}
if (msg.endsWith(LINE_SEPARATOR)) {
printStream.print(msg);
} els... | [
"@",
"Override",
"public",
"void",
"log",
"(",
"String",
"msg",
")",
"{",
"verifySystemOut",
"(",
")",
";",
"PrintStream",
"printStream",
"=",
"out",
";",
"try",
"{",
"if",
"(",
"userInputActive",
")",
"{",
"erasePrompt",
"(",
"printStream",
")",
";",
"}... | Logs a message below the current status message.
@param msg The message to log | [
"Logs",
"a",
"message",
"below",
"the",
"current",
"status",
"message",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L868-L886 |
129,925 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java | MicronautConsole.append | public void append(String msg) {
verifySystemOut();
PrintStream printStream = out;
try {
if (userInputActive && !appendCalled) {
printStream.print(moveDownToSkipPrompt());
appendCalled = true;
}
if (msg.endsWith(LINE_SEPARATOR))... | java | public void append(String msg) {
verifySystemOut();
PrintStream printStream = out;
try {
if (userInputActive && !appendCalled) {
printStream.print(moveDownToSkipPrompt());
appendCalled = true;
}
if (msg.endsWith(LINE_SEPARATOR))... | [
"public",
"void",
"append",
"(",
"String",
"msg",
")",
"{",
"verifySystemOut",
"(",
")",
";",
"PrintStream",
"printStream",
"=",
"out",
";",
"try",
"{",
"if",
"(",
"userInputActive",
"&&",
"!",
"appendCalled",
")",
"{",
"printStream",
".",
"print",
"(",
... | Append a message.
@param msg The message | [
"Append",
"a",
"message",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L898-L915 |
129,926 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java | AWSParameterStoreConfigClient.getHierarchy | private Publisher<GetParametersByPathResult> getHierarchy(String path) {
GetParametersByPathRequest getRequest = new GetParametersByPathRequest().withWithDecryption(awsParameterStoreConfiguration.getUseSecureParameters()).withPath(path).withRecursive(true);
Future<GetParametersByPathResult> future = c... | java | private Publisher<GetParametersByPathResult> getHierarchy(String path) {
GetParametersByPathRequest getRequest = new GetParametersByPathRequest().withWithDecryption(awsParameterStoreConfiguration.getUseSecureParameters()).withPath(path).withRecursive(true);
Future<GetParametersByPathResult> future = c... | [
"private",
"Publisher",
"<",
"GetParametersByPathResult",
">",
"getHierarchy",
"(",
"String",
"path",
")",
"{",
"GetParametersByPathRequest",
"getRequest",
"=",
"new",
"GetParametersByPathRequest",
"(",
")",
".",
"withWithDecryption",
"(",
"awsParameterStoreConfiguration",
... | Gets the Parameter hierarchy from AWS parameter store.
Please note this only returns something if the current node has children and will not return itself.
@param path path based on the parameter names PRIORITY_TOP.e. /config/application/.*
@return Publisher for GetParametersByPathResult | [
"Gets",
"the",
"Parameter",
"hierarchy",
"from",
"AWS",
"parameter",
"store",
".",
"Please",
"note",
"this",
"only",
"returns",
"something",
"if",
"the",
"current",
"node",
"has",
"children",
"and",
"will",
"not",
"return",
"itself",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java#L245-L257 |
129,927 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java | AWSParameterStoreConfigClient.getParameters | private Publisher<GetParametersResult> getParameters(String path) {
GetParametersRequest getRequest = new GetParametersRequest().withWithDecryption(awsParameterStoreConfiguration.getUseSecureParameters()).withNames(path);
Future<GetParametersResult> future = client.getParametersAsync(getRequest);
... | java | private Publisher<GetParametersResult> getParameters(String path) {
GetParametersRequest getRequest = new GetParametersRequest().withWithDecryption(awsParameterStoreConfiguration.getUseSecureParameters()).withNames(path);
Future<GetParametersResult> future = client.getParametersAsync(getRequest);
... | [
"private",
"Publisher",
"<",
"GetParametersResult",
">",
"getParameters",
"(",
"String",
"path",
")",
"{",
"GetParametersRequest",
"getRequest",
"=",
"new",
"GetParametersRequest",
"(",
")",
".",
"withWithDecryption",
"(",
"awsParameterStoreConfiguration",
".",
"getUseS... | Gets the parameters from AWS.
@param path this is the hierarchy path (via name field) from the property store
@return invokeFlowable - converted future from AWS SDK Async | [
"Gets",
"the",
"parameters",
"from",
"AWS",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java#L265-L277 |
129,928 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java | AWSParameterStoreConfigClient.calcPropertySourceNames | private Set<String> calcPropertySourceNames(String prefix, Set<String> activeNames) {
return ClientUtil.calcPropertySourceNames(prefix, activeNames, "_");
} | java | private Set<String> calcPropertySourceNames(String prefix, Set<String> activeNames) {
return ClientUtil.calcPropertySourceNames(prefix, activeNames, "_");
} | [
"private",
"Set",
"<",
"String",
">",
"calcPropertySourceNames",
"(",
"String",
"prefix",
",",
"Set",
"<",
"String",
">",
"activeNames",
")",
"{",
"return",
"ClientUtil",
".",
"calcPropertySourceNames",
"(",
"prefix",
",",
"activeNames",
",",
"\"_\"",
")",
";"... | Calculates property names to look for.
@param prefix The prefix
@param activeNames active environment names
@return A set of calculated property names | [
"Calculates",
"property",
"names",
"to",
"look",
"for",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java#L298-L300 |
129,929 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java | AWSParameterStoreConfigClient.convertParametersToMap | private Map<String, Object> convertParametersToMap(ParametersWithBasePath parametersWithBasePath) {
Map<String, Object> output = new HashMap<>();
for (Parameter param : parametersWithBasePath.parameters) {
switch (param.getType()) {
case "StringList":
// ... | java | private Map<String, Object> convertParametersToMap(ParametersWithBasePath parametersWithBasePath) {
Map<String, Object> output = new HashMap<>();
for (Parameter param : parametersWithBasePath.parameters) {
switch (param.getType()) {
case "StringList":
// ... | [
"private",
"Map",
"<",
"String",
",",
"Object",
">",
"convertParametersToMap",
"(",
"ParametersWithBasePath",
"parametersWithBasePath",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"output",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"Par... | Helper class for converting parameters from amazon format to a map.
@param parametersWithBasePath parameters with the base path
@return map of the results, converted | [
"Helper",
"class",
"for",
"converting",
"parameters",
"from",
"amazon",
"format",
"to",
"a",
"map",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/parameterstore/AWSParameterStoreConfigClient.java#L308-L353 |
129,930 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/beans/SimpleBeanInfo.java | SimpleBeanInfo.introspectProperties | @SuppressWarnings("unchecked")
private List<PropertyDescriptor> introspectProperties(Method[] methodDescriptors) {
// Get the list of public non-static methods into an array
if (methodDescriptors == null) {
return null;
}
HashMap<String, HashMap> propertyTable = new Has... | java | @SuppressWarnings("unchecked")
private List<PropertyDescriptor> introspectProperties(Method[] methodDescriptors) {
// Get the list of public non-static methods into an array
if (methodDescriptors == null) {
return null;
}
HashMap<String, HashMap> propertyTable = new Has... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"List",
"<",
"PropertyDescriptor",
">",
"introspectProperties",
"(",
"Method",
"[",
"]",
"methodDescriptors",
")",
"{",
"// Get the list of public non-static methods into an array",
"if",
"(",
"methodDescriptors... | Introspects the supplied class and returns a list of the Properties of
the class.
@param methodDescriptors the method descriptors
@return The list of Properties as an array of PropertyDescriptors | [
"Introspects",
"the",
"supplied",
"class",
"and",
"returns",
"a",
"list",
"of",
"the",
"Properties",
"of",
"the",
"class",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/beans/SimpleBeanInfo.java#L95-L137 |
129,931 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/async/publisher/Publishers.java | Publishers.onComplete | public static <T> Publisher<T> onComplete(Publisher<T> publisher, Supplier<CompletableFuture<Void>> future) {
return actual -> publisher.subscribe(new CompletionAwareSubscriber<T>() {
@Override
protected void doOnSubscribe(Subscription subscription) {
actual.onSubscribe(s... | java | public static <T> Publisher<T> onComplete(Publisher<T> publisher, Supplier<CompletableFuture<Void>> future) {
return actual -> publisher.subscribe(new CompletionAwareSubscriber<T>() {
@Override
protected void doOnSubscribe(Subscription subscription) {
actual.onSubscribe(s... | [
"public",
"static",
"<",
"T",
">",
"Publisher",
"<",
"T",
">",
"onComplete",
"(",
"Publisher",
"<",
"T",
">",
"publisher",
",",
"Supplier",
"<",
"CompletableFuture",
"<",
"Void",
">",
">",
"future",
")",
"{",
"return",
"actual",
"->",
"publisher",
".",
... | Allow executing logic on completion of a Publisher.
@param publisher The publisher
@param future The runnable
@param <T> The generic type
@return The mapped publisher | [
"Allow",
"executing",
"logic",
"on",
"completion",
"of",
"a",
"Publisher",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/async/publisher/Publishers.java#L208-L241 |
129,932 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/async/publisher/Publishers.java | Publishers.isConvertibleToPublisher | public static boolean isConvertibleToPublisher(Class<?> type) {
if (Publisher.class.isAssignableFrom(type)) {
return true;
} else {
for (Class<?> reactiveType : REACTIVE_TYPES) {
if (reactiveType.isAssignableFrom(type)) {
return true;
... | java | public static boolean isConvertibleToPublisher(Class<?> type) {
if (Publisher.class.isAssignableFrom(type)) {
return true;
} else {
for (Class<?> reactiveType : REACTIVE_TYPES) {
if (reactiveType.isAssignableFrom(type)) {
return true;
... | [
"public",
"static",
"boolean",
"isConvertibleToPublisher",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"if",
"(",
"Publisher",
".",
"class",
".",
"isAssignableFrom",
"(",
"type",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"for",
"(",
"C... | Is the given type a Publisher or convertible to a publisher.
@param type The type to check
@return True if it is | [
"Is",
"the",
"given",
"type",
"a",
"Publisher",
"or",
"convertible",
"to",
"a",
"publisher",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/async/publisher/Publishers.java#L249-L260 |
129,933 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/async/publisher/Publishers.java | Publishers.isConvertibleToPublisher | public static boolean isConvertibleToPublisher(Object object) {
if (object == null) {
return false;
}
if (object instanceof Publisher) {
return true;
} else {
return isConvertibleToPublisher(object.getClass());
}
} | java | public static boolean isConvertibleToPublisher(Object object) {
if (object == null) {
return false;
}
if (object instanceof Publisher) {
return true;
} else {
return isConvertibleToPublisher(object.getClass());
}
} | [
"public",
"static",
"boolean",
"isConvertibleToPublisher",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"object",
"instanceof",
"Publisher",
")",
"{",
"return",
"true",
";",
"}",
... | Is the given object a Publisher or convertible to a publisher.
@param object The object
@return True if it is | [
"Is",
"the",
"given",
"object",
"a",
"Publisher",
"or",
"convertible",
"to",
"a",
"publisher",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/async/publisher/Publishers.java#L268-L277 |
129,934 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/async/publisher/Publishers.java | Publishers.convertPublisher | public static <T> T convertPublisher(Object object, Class<T> publisherType) {
Objects.requireNonNull(object, "Invalid argument [object]: " + object);
Objects.requireNonNull(object, "Invalid argument [publisherType]: " + publisherType);
if (object instanceof CompletableFuture) {
@Supp... | java | public static <T> T convertPublisher(Object object, Class<T> publisherType) {
Objects.requireNonNull(object, "Invalid argument [object]: " + object);
Objects.requireNonNull(object, "Invalid argument [publisherType]: " + publisherType);
if (object instanceof CompletableFuture) {
@Supp... | [
"public",
"static",
"<",
"T",
">",
"T",
"convertPublisher",
"(",
"Object",
"object",
",",
"Class",
"<",
"T",
">",
"publisherType",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"object",
",",
"\"Invalid argument [object]: \"",
"+",
"object",
")",
";",
"Ob... | Attempts to convert the publisher to the given type.
@param object The object to convert
@param publisherType The publisher type
@param <T> The generic type
@return The Resulting in publisher | [
"Attempts",
"to",
"convert",
"the",
"publisher",
"to",
"the",
"given",
"type",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/async/publisher/Publishers.java#L287-L298 |
129,935 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/async/publisher/Publishers.java | Publishers.isSingle | public static boolean isSingle(Class<?> type) {
for (Class<?> reactiveType : SINGLE_TYPES) {
if (reactiveType.isAssignableFrom(type)) {
return true;
}
}
return false;
} | java | public static boolean isSingle(Class<?> type) {
for (Class<?> reactiveType : SINGLE_TYPES) {
if (reactiveType.isAssignableFrom(type)) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"isSingle",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
">",
"reactiveType",
":",
"SINGLE_TYPES",
")",
"{",
"if",
"(",
"reactiveType",
".",
"isAssignableFrom",
"(",
"type",
")",
")",
"{",... | Does the given reactive type emit a single result.
@param type The type
@return True it does | [
"Does",
"the",
"given",
"reactive",
"type",
"emit",
"a",
"single",
"result",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/async/publisher/Publishers.java#L307-L314 |
129,936 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/annotation/AbstractAnnotationMetadata.java | AbstractAnnotationMetadata.addAnnotationValuesFromData | protected final void addAnnotationValuesFromData(List results, Map<CharSequence, Object> values) {
if (values != null) {
Object v = values.get(AnnotationMetadata.VALUE_MEMBER);
if (v instanceof io.micronaut.core.annotation.AnnotationValue[]) {
io.micronaut.core.annotation... | java | protected final void addAnnotationValuesFromData(List results, Map<CharSequence, Object> values) {
if (values != null) {
Object v = values.get(AnnotationMetadata.VALUE_MEMBER);
if (v instanceof io.micronaut.core.annotation.AnnotationValue[]) {
io.micronaut.core.annotation... | [
"protected",
"final",
"void",
"addAnnotationValuesFromData",
"(",
"List",
"results",
",",
"Map",
"<",
"CharSequence",
",",
"Object",
">",
"values",
")",
"{",
"if",
"(",
"values",
"!=",
"null",
")",
"{",
"Object",
"v",
"=",
"values",
".",
"get",
"(",
"Ann... | Adds any annotation values found in the values map to the results.
@param results The results
@param values The values | [
"Adds",
"any",
"annotation",
"values",
"found",
"in",
"the",
"values",
"map",
"to",
"the",
"results",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/AbstractAnnotationMetadata.java#L145-L162 |
129,937 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/annotation/AbstractAnnotationMetadata.java | AbstractAnnotationMetadata.addValuesToResults | protected void addValuesToResults(List<io.micronaut.core.annotation.AnnotationValue> results, io.micronaut.core.annotation.AnnotationValue values) {
results.add(values);
} | java | protected void addValuesToResults(List<io.micronaut.core.annotation.AnnotationValue> results, io.micronaut.core.annotation.AnnotationValue values) {
results.add(values);
} | [
"protected",
"void",
"addValuesToResults",
"(",
"List",
"<",
"io",
".",
"micronaut",
".",
"core",
".",
"annotation",
".",
"AnnotationValue",
">",
"results",
",",
"io",
".",
"micronaut",
".",
"core",
".",
"annotation",
".",
"AnnotationValue",
"values",
")",
"... | Adds a values instance to the results.
@param results The results
@param values The values | [
"Adds",
"a",
"values",
"instance",
"to",
"the",
"results",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/AbstractAnnotationMetadata.java#L170-L172 |
129,938 | micronaut-projects/micronaut-core | router/src/main/java/io/micronaut/web/router/resource/StaticResourceResolver.java | StaticResourceResolver.resolve | public Optional<URL> resolve(String resourcePath) {
for (Map.Entry<String, List<ResourceLoader>> entry : resourceMappings.entrySet()) {
List<ResourceLoader> loaders = entry.getValue();
String mapping = entry.getKey();
if (!loaders.isEmpty() && pathMatcher.matches(mapping, res... | java | public Optional<URL> resolve(String resourcePath) {
for (Map.Entry<String, List<ResourceLoader>> entry : resourceMappings.entrySet()) {
List<ResourceLoader> loaders = entry.getValue();
String mapping = entry.getKey();
if (!loaders.isEmpty() && pathMatcher.matches(mapping, res... | [
"public",
"Optional",
"<",
"URL",
">",
"resolve",
"(",
"String",
"resourcePath",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"ResourceLoader",
">",
">",
"entry",
":",
"resourceMappings",
".",
"entrySet",
"(",
")",
")",
"... | Resolves a path to a URL.
@param resourcePath The path to the resource
@return The optional URL | [
"Resolves",
"a",
"path",
"to",
"a",
"URL",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/router/src/main/java/io/micronaut/web/router/resource/StaticResourceResolver.java#L68-L102 |
129,939 | micronaut-projects/micronaut-core | http-client/src/main/java/io/micronaut/http/client/interceptor/HttpClientIntroductionAdvice.java | HttpClientIntroductionAdvice.resolveTemplate | private String resolveTemplate(AnnotationValue<Client> clientAnnotation, String templateString) {
String path = clientAnnotation.get("path", String.class).orElse(null);
if (StringUtils.isNotEmpty(path)) {
return path + templateString;
} else {
String value = clientAnnotat... | java | private String resolveTemplate(AnnotationValue<Client> clientAnnotation, String templateString) {
String path = clientAnnotation.get("path", String.class).orElse(null);
if (StringUtils.isNotEmpty(path)) {
return path + templateString;
} else {
String value = clientAnnotat... | [
"private",
"String",
"resolveTemplate",
"(",
"AnnotationValue",
"<",
"Client",
">",
"clientAnnotation",
",",
"String",
"templateString",
")",
"{",
"String",
"path",
"=",
"clientAnnotation",
".",
"get",
"(",
"\"path\"",
",",
"String",
".",
"class",
")",
".",
"o... | Resolve the template for the client annotation.
@param clientAnnotation client annotation reference
@param templateString template to be applied
@return resolved template contents | [
"Resolve",
"the",
"template",
"for",
"the",
"client",
"annotation",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http-client/src/main/java/io/micronaut/http/client/interceptor/HttpClientIntroductionAdvice.java#L580-L593 |
129,940 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ExecutableElementParamInfo.java | ExecutableElementParamInfo.addGenericTypes | void addGenericTypes(String paramName, Map<String, Object> generics) {
genericTypes.put(paramName, generics);
} | java | void addGenericTypes(String paramName, Map<String, Object> generics) {
genericTypes.put(paramName, generics);
} | [
"void",
"addGenericTypes",
"(",
"String",
"paramName",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"generics",
")",
"{",
"genericTypes",
".",
"put",
"(",
"paramName",
",",
"generics",
")",
";",
"}"
] | Adds generics info for the given parameter name.
@param paramName The parameter name
@param generics The generics info | [
"Adds",
"generics",
"info",
"for",
"the",
"given",
"parameter",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ExecutableElementParamInfo.java#L72-L74 |
129,941 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/io/support/AntPathMatcher.java | AntPathMatcher.countOccurrencesOf | public static int countOccurrencesOf(String str, String sub) {
if (str == null || sub == null || str.length() == 0 || sub.length() == 0) {
return 0;
}
int count = 0;
int pos = 0;
int idx;
while ((idx = str.indexOf(sub, pos)) != -1) {
++count;
... | java | public static int countOccurrencesOf(String str, String sub) {
if (str == null || sub == null || str.length() == 0 || sub.length() == 0) {
return 0;
}
int count = 0;
int pos = 0;
int idx;
while ((idx = str.indexOf(sub, pos)) != -1) {
++count;
... | [
"public",
"static",
"int",
"countOccurrencesOf",
"(",
"String",
"str",
",",
"String",
"sub",
")",
"{",
"if",
"(",
"str",
"==",
"null",
"||",
"sub",
"==",
"null",
"||",
"str",
".",
"length",
"(",
")",
"==",
"0",
"||",
"sub",
".",
"length",
"(",
")",... | Count the occurrences of the substring in string s.
@param str string to search in. Return 0 if this is null.
@param sub string to search for. Return 0 if this is null.
@return The number of occurrences | [
"Count",
"the",
"occurrences",
"of",
"the",
"substring",
"in",
"string",
"s",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/AntPathMatcher.java#L410-L422 |
129,942 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java | BeanDefinitionWriter.visitBeanDefinitionConstructor | @Override
public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Map<String, Object> argumentTypes,
Map<String, Annotati... | java | @Override
public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Map<String, Object> argumentTypes,
Map<String, Annotati... | [
"@",
"Override",
"public",
"void",
"visitBeanDefinitionConstructor",
"(",
"AnnotationMetadata",
"annotationMetadata",
",",
"boolean",
"requiresReflection",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"argumentTypes",
",",
"Map",
"<",
"String",
",",
"AnnotationMetad... | Visits the constructor used to create the bean definition.
@param annotationMetadata The annotation metadata for the constructor
@param requiresReflection Whether invoking the constructor requires reflection
@param argumentTypes The argument type names for each parameter
@param argumentAnn... | [
"Visits",
"the",
"constructor",
"used",
"to",
"create",
"the",
"bean",
"definition",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java#L412-L433 |
129,943 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java | BeanDefinitionWriter.visitBeanDefinitionConstructor | @Override
public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection) {
if (constructorVisitor == null) {
// first build the constructor
visitBeanDefinitionConstructorInternal(annotationM... | java | @Override
public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection) {
if (constructorVisitor == null) {
// first build the constructor
visitBeanDefinitionConstructorInternal(annotationM... | [
"@",
"Override",
"public",
"void",
"visitBeanDefinitionConstructor",
"(",
"AnnotationMetadata",
"annotationMetadata",
",",
"boolean",
"requiresReflection",
")",
"{",
"if",
"(",
"constructorVisitor",
"==",
"null",
")",
"{",
"// first build the constructor",
"visitBeanDefinit... | Visits a no-args constructor used to create the bean definition. | [
"Visits",
"a",
"no",
"-",
"args",
"constructor",
"used",
"to",
"create",
"the",
"bean",
"definition",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java#L438-L451 |
129,944 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java | BeanDefinitionWriter.visitBeanDefinitionEnd | @SuppressWarnings("Duplicates")
@Override
public void visitBeanDefinitionEnd() {
if (classWriter == null) {
throw new IllegalStateException("At least one called to visitBeanDefinitionConstructor(..) is required");
}
String[] interfaceInternalNames = new String[interfaceTypes... | java | @SuppressWarnings("Duplicates")
@Override
public void visitBeanDefinitionEnd() {
if (classWriter == null) {
throw new IllegalStateException("At least one called to visitBeanDefinitionConstructor(..) is required");
}
String[] interfaceInternalNames = new String[interfaceTypes... | [
"@",
"SuppressWarnings",
"(",
"\"Duplicates\"",
")",
"@",
"Override",
"public",
"void",
"visitBeanDefinitionEnd",
"(",
")",
"{",
"if",
"(",
"classWriter",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"At least one called to visitBeanDefiniti... | Finalize the bean definition to the given output stream. | [
"Finalize",
"the",
"bean",
"definition",
"to",
"the",
"given",
"output",
"stream",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java#L456-L517 |
129,945 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/io/support/ResourceLocator.java | ResourceLocator.setSearchLocation | public void setSearchLocation(String searchLocation) {
ResourceLoader resourceLoader = getDefaultResourceLoader();
patchMatchingResolver = new PathMatchingResourcePatternResolver(resourceLoader);
initializeForSearchLocation(searchLocation);
} | java | public void setSearchLocation(String searchLocation) {
ResourceLoader resourceLoader = getDefaultResourceLoader();
patchMatchingResolver = new PathMatchingResourcePatternResolver(resourceLoader);
initializeForSearchLocation(searchLocation);
} | [
"public",
"void",
"setSearchLocation",
"(",
"String",
"searchLocation",
")",
"{",
"ResourceLoader",
"resourceLoader",
"=",
"getDefaultResourceLoader",
"(",
")",
";",
"patchMatchingResolver",
"=",
"new",
"PathMatchingResourcePatternResolver",
"(",
"resourceLoader",
")",
";... | Set the search location.
@param searchLocation The search location | [
"Set",
"the",
"search",
"location",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/ResourceLocator.java#L52-L56 |
129,946 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/io/support/ResourceLocator.java | ResourceLocator.setSearchLocations | public void setSearchLocations(Collection<String> searchLocations) {
patchMatchingResolver = new PathMatchingResourcePatternResolver(getDefaultResourceLoader());
for (String searchLocation : searchLocations) {
initializeForSearchLocation(searchLocation);
}
} | java | public void setSearchLocations(Collection<String> searchLocations) {
patchMatchingResolver = new PathMatchingResourcePatternResolver(getDefaultResourceLoader());
for (String searchLocation : searchLocations) {
initializeForSearchLocation(searchLocation);
}
} | [
"public",
"void",
"setSearchLocations",
"(",
"Collection",
"<",
"String",
">",
"searchLocations",
")",
"{",
"patchMatchingResolver",
"=",
"new",
"PathMatchingResourcePatternResolver",
"(",
"getDefaultResourceLoader",
"(",
")",
")",
";",
"for",
"(",
"String",
"searchLo... | Set search locations.
@param searchLocations The search locations | [
"Set",
"search",
"locations",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/ResourceLocator.java#L70-L75 |
129,947 | micronaut-projects/micronaut-core | cli/src/main/groovy/io/micronaut/cli/io/support/ResourceLocator.java | ResourceLocator.findResourceForClassName | public Resource findResourceForClassName(String className) {
if (className.contains(CLOSURE_MARKER)) {
className = className.substring(0, className.indexOf(CLOSURE_MARKER));
}
Resource resource = classNameToResourceCache.get(className);
if (resource == null) {
St... | java | public Resource findResourceForClassName(String className) {
if (className.contains(CLOSURE_MARKER)) {
className = className.substring(0, className.indexOf(CLOSURE_MARKER));
}
Resource resource = classNameToResourceCache.get(className);
if (resource == null) {
St... | [
"public",
"Resource",
"findResourceForClassName",
"(",
"String",
"className",
")",
"{",
"if",
"(",
"className",
".",
"contains",
"(",
"CLOSURE_MARKER",
")",
")",
"{",
"className",
"=",
"className",
".",
"substring",
"(",
"0",
",",
"className",
".",
"indexOf",
... | Find a resource for class name.
@param className The class name
@return The resource if found, {@code null} otherwise | [
"Find",
"a",
"resource",
"for",
"class",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/ResourceLocator.java#L151-L168 |
129,948 | micronaut-projects/micronaut-core | views/src/main/java/io/micronaut/views/thymeleaf/ThymeleafFactory.java | ThymeleafFactory.templateResolver | @Singleton
public AbstractConfigurableTemplateResolver templateResolver(ViewsConfiguration viewsConfiguration,
ThymeleafViewsRendererConfiguration rendererConfiguration) {
ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver... | java | @Singleton
public AbstractConfigurableTemplateResolver templateResolver(ViewsConfiguration viewsConfiguration,
ThymeleafViewsRendererConfiguration rendererConfiguration) {
ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver... | [
"@",
"Singleton",
"public",
"AbstractConfigurableTemplateResolver",
"templateResolver",
"(",
"ViewsConfiguration",
"viewsConfiguration",
",",
"ThymeleafViewsRendererConfiguration",
"rendererConfiguration",
")",
"{",
"ClassLoaderTemplateResolver",
"templateResolver",
"=",
"new",
"Cl... | Constructs the template resolver bean.
@param viewsConfiguration The views configuration
@param rendererConfiguration The renderer configuration
@return The template resolver | [
"Constructs",
"the",
"template",
"resolver",
"bean",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/views/src/main/java/io/micronaut/views/thymeleaf/ThymeleafFactory.java#L46-L62 |
129,949 | micronaut-projects/micronaut-core | views/src/main/java/io/micronaut/views/thymeleaf/ThymeleafFactory.java | ThymeleafFactory.templateEngine | @Singleton
public TemplateEngine templateEngine(ITemplateResolver templateResolver,
IEngineContextFactory engineContextFactory, ILinkBuilder linkBuilder) {
TemplateEngine engine = new TemplateEngine();
engine.setEngineContextFactory(engineContextFactory);
engine.setLinkBuilder(li... | java | @Singleton
public TemplateEngine templateEngine(ITemplateResolver templateResolver,
IEngineContextFactory engineContextFactory, ILinkBuilder linkBuilder) {
TemplateEngine engine = new TemplateEngine();
engine.setEngineContextFactory(engineContextFactory);
engine.setLinkBuilder(li... | [
"@",
"Singleton",
"public",
"TemplateEngine",
"templateEngine",
"(",
"ITemplateResolver",
"templateResolver",
",",
"IEngineContextFactory",
"engineContextFactory",
",",
"ILinkBuilder",
"linkBuilder",
")",
"{",
"TemplateEngine",
"engine",
"=",
"new",
"TemplateEngine",
"(",
... | Constructs the template engine.
@param templateResolver The template resolver
@param engineContextFactory The engine context factory
@param linkBuilder The link builder
@return The template engine | [
"Constructs",
"the",
"template",
"engine",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/views/src/main/java/io/micronaut/views/thymeleaf/ThymeleafFactory.java#L72-L80 |
129,950 | micronaut-projects/micronaut-core | runtime/src/main/java/io/micronaut/reactive/reactor/ReactorInstrumentation.java | ReactorInstrumentation.init | @SuppressWarnings("unchecked")
@PostConstruct
void init(BeanContext beanContext, ThreadFactory threadFactory) {
try {
BeanDefinition<ExecutorService> beanDefinition = beanContext.getBeanDefinition(ExecutorService.class, Qualifiers.byName(TaskExecutors.SCHEDULED));
Collection<Bean... | java | @SuppressWarnings("unchecked")
@PostConstruct
void init(BeanContext beanContext, ThreadFactory threadFactory) {
try {
BeanDefinition<ExecutorService> beanDefinition = beanContext.getBeanDefinition(ExecutorService.class, Qualifiers.byName(TaskExecutors.SCHEDULED));
Collection<Bean... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"PostConstruct",
"void",
"init",
"(",
"BeanContext",
"beanContext",
",",
"ThreadFactory",
"threadFactory",
")",
"{",
"try",
"{",
"BeanDefinition",
"<",
"ExecutorService",
">",
"beanDefinition",
"=",
"beanConte... | Initialize instrumentation for reactor with the tracer and factory.
@param beanContext The bean context
@param threadFactory The factory to create new threads on-demand | [
"Initialize",
"instrumentation",
"for",
"reactor",
"with",
"the",
"tracer",
"and",
"factory",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/reactive/reactor/ReactorInstrumentation.java#L59-L82 |
129,951 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java | AnnotationUtils.hasStereotype | protected boolean hasStereotype(Element element, Class<? extends Annotation> stereotype) {
return hasStereotype(element, stereotype.getName());
} | java | protected boolean hasStereotype(Element element, Class<? extends Annotation> stereotype) {
return hasStereotype(element, stereotype.getName());
} | [
"protected",
"boolean",
"hasStereotype",
"(",
"Element",
"element",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"stereotype",
")",
"{",
"return",
"hasStereotype",
"(",
"element",
",",
"stereotype",
".",
"getName",
"(",
")",
")",
";",
"}"
] | Return whether the given element is annotated with the given annotation stereotype.
@param element The element
@param stereotype The stereotype
@return True if it is | [
"Return",
"whether",
"the",
"given",
"element",
"is",
"annotated",
"with",
"the",
"given",
"annotation",
"stereotype",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java#L140-L142 |
129,952 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java | AnnotationUtils.hasStereotype | protected boolean hasStereotype(Element element, String... stereotypes) {
return hasStereotype(element, Arrays.asList(stereotypes));
} | java | protected boolean hasStereotype(Element element, String... stereotypes) {
return hasStereotype(element, Arrays.asList(stereotypes));
} | [
"protected",
"boolean",
"hasStereotype",
"(",
"Element",
"element",
",",
"String",
"...",
"stereotypes",
")",
"{",
"return",
"hasStereotype",
"(",
"element",
",",
"Arrays",
".",
"asList",
"(",
"stereotypes",
")",
")",
";",
"}"
] | Return whether the given element is annotated with the given annotation stereotypes.
@param element The element
@param stereotypes The stereotypes
@return True if it is | [
"Return",
"whether",
"the",
"given",
"element",
"is",
"annotated",
"with",
"the",
"given",
"annotation",
"stereotypes",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java#L151-L153 |
129,953 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java | AnnotationUtils.hasStereotype | protected boolean hasStereotype(Element element, List<String> stereotypes) {
if (element == null) {
return false;
}
if (stereotypes.contains(element.toString())) {
return true;
}
AnnotationMetadata annotationMetadata = getAnnotationMetadata(element);
... | java | protected boolean hasStereotype(Element element, List<String> stereotypes) {
if (element == null) {
return false;
}
if (stereotypes.contains(element.toString())) {
return true;
}
AnnotationMetadata annotationMetadata = getAnnotationMetadata(element);
... | [
"protected",
"boolean",
"hasStereotype",
"(",
"Element",
"element",
",",
"List",
"<",
"String",
">",
"stereotypes",
")",
"{",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"stereotypes",
".",
"contains",
"(",
"elem... | Return whether the given element is annotated with any of the given annotation stereotypes.
@param element The element
@param stereotypes The stereotypes
@return True if it is | [
"Return",
"whether",
"the",
"given",
"element",
"is",
"annotated",
"with",
"any",
"of",
"the",
"given",
"annotation",
"stereotypes",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java#L162-L176 |
129,954 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java | AnnotationUtils.isAnnotated | public boolean isAnnotated(ExecutableElement method) {
List<? extends AnnotationMirror> annotationMirrors = method.getAnnotationMirrors();
for (AnnotationMirror annotationMirror : annotationMirrors) {
String typeName = annotationMirror.getAnnotationType().toString();
if (!Annotat... | java | public boolean isAnnotated(ExecutableElement method) {
List<? extends AnnotationMirror> annotationMirrors = method.getAnnotationMirrors();
for (AnnotationMirror annotationMirror : annotationMirrors) {
String typeName = annotationMirror.getAnnotationType().toString();
if (!Annotat... | [
"public",
"boolean",
"isAnnotated",
"(",
"ExecutableElement",
"method",
")",
"{",
"List",
"<",
"?",
"extends",
"AnnotationMirror",
">",
"annotationMirrors",
"=",
"method",
".",
"getAnnotationMirrors",
"(",
")",
";",
"for",
"(",
"AnnotationMirror",
"annotationMirror"... | Check whether the method is annotated.
@param method The method
@return True if it is annotated with non internal annotations | [
"Check",
"whether",
"the",
"method",
"is",
"annotated",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/AnnotationUtils.java#L220-L229 |
129,955 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java | Route53AutoNamingClient.convertInstancesResulttoServiceInstances | private Flowable<List<ServiceInstance>> convertInstancesResulttoServiceInstances(ListInstancesResult instancesResult) {
List<ServiceInstance> serviceInstances = new ArrayList<>();
for (InstanceSummary instanceSummary : instancesResult.getInstances()) {
try {
String uri = "htt... | java | private Flowable<List<ServiceInstance>> convertInstancesResulttoServiceInstances(ListInstancesResult instancesResult) {
List<ServiceInstance> serviceInstances = new ArrayList<>();
for (InstanceSummary instanceSummary : instancesResult.getInstances()) {
try {
String uri = "htt... | [
"private",
"Flowable",
"<",
"List",
"<",
"ServiceInstance",
">",
">",
"convertInstancesResulttoServiceInstances",
"(",
"ListInstancesResult",
"instancesResult",
")",
"{",
"List",
"<",
"ServiceInstance",
">",
"serviceInstances",
"=",
"new",
"ArrayList",
"<>",
"(",
")",... | transforms an aws result into a list of service instances.
@param instancesResult instance result list of a service from aws route 53
@return serviceInstance list that micronaut wants | [
"transforms",
"an",
"aws",
"result",
"into",
"a",
"list",
"of",
"service",
"instances",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java#L114-L126 |
129,956 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java | Route53AutoNamingClient.getInstances | @Override
public Publisher<List<ServiceInstance>> getInstances(String serviceId) {
if (serviceId == null) {
serviceId = getRoute53ClientDiscoveryConfiguration().getAwsServiceId(); // we can default to the config file
}
ListInstancesRequest instancesRequest = new ListInstancesReq... | java | @Override
public Publisher<List<ServiceInstance>> getInstances(String serviceId) {
if (serviceId == null) {
serviceId = getRoute53ClientDiscoveryConfiguration().getAwsServiceId(); // we can default to the config file
}
ListInstancesRequest instancesRequest = new ListInstancesReq... | [
"@",
"Override",
"public",
"Publisher",
"<",
"List",
"<",
"ServiceInstance",
">",
">",
"getInstances",
"(",
"String",
"serviceId",
")",
"{",
"if",
"(",
"serviceId",
"==",
"null",
")",
"{",
"serviceId",
"=",
"getRoute53ClientDiscoveryConfiguration",
"(",
")",
"... | Gets a list of instances registered with Route53 given a service ID.
@param serviceId The service id
@return list of serviceInstances usable by MN. | [
"Gets",
"a",
"list",
"of",
"instances",
"registered",
"with",
"Route53",
"given",
"a",
"service",
"ID",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java#L133-L142 |
129,957 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java | Route53AutoNamingClient.getServiceIds | @Override
public Publisher<List<String>> getServiceIds() {
ServiceFilter serviceFilter = new ServiceFilter().withName("NAMESPACE_ID").withValues(getRoute53ClientDiscoveryConfiguration().getNamespaceId());
ListServicesRequest listServicesRequest = new ListServicesRequest().withFilters(serviceFilter);... | java | @Override
public Publisher<List<String>> getServiceIds() {
ServiceFilter serviceFilter = new ServiceFilter().withName("NAMESPACE_ID").withValues(getRoute53ClientDiscoveryConfiguration().getNamespaceId());
ListServicesRequest listServicesRequest = new ListServicesRequest().withFilters(serviceFilter);... | [
"@",
"Override",
"public",
"Publisher",
"<",
"List",
"<",
"String",
">",
">",
"getServiceIds",
"(",
")",
"{",
"ServiceFilter",
"serviceFilter",
"=",
"new",
"ServiceFilter",
"(",
")",
".",
"withName",
"(",
"\"NAMESPACE_ID\"",
")",
".",
"withValues",
"(",
"get... | Gets a list of service IDs from AWS for a given namespace.
@return rx java publisher list of the service IDs in string format | [
"Gets",
"a",
"list",
"of",
"service",
"IDs",
"from",
"AWS",
"for",
"a",
"given",
"namespace",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java#L148-L155 |
129,958 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java | Route53AutoNamingClient.convertServiceIds | private Publisher<List<String>> convertServiceIds(ListServicesResult listServicesResult) {
List<ServiceSummary> services = listServicesResult.getServices();
List<String> serviceIds = new ArrayList<>();
for (ServiceSummary service : services) {
serviceIds.add(service.getId());
... | java | private Publisher<List<String>> convertServiceIds(ListServicesResult listServicesResult) {
List<ServiceSummary> services = listServicesResult.getServices();
List<String> serviceIds = new ArrayList<>();
for (ServiceSummary service : services) {
serviceIds.add(service.getId());
... | [
"private",
"Publisher",
"<",
"List",
"<",
"String",
">",
">",
"convertServiceIds",
"(",
"ListServicesResult",
"listServicesResult",
")",
"{",
"List",
"<",
"ServiceSummary",
">",
"services",
"=",
"listServicesResult",
".",
"getServices",
"(",
")",
";",
"List",
"<... | Converts the services IDs returned for usage in MN.
@param listServicesResult service result returned from AWS
@return RXJava publisher of the service list | [
"Converts",
"the",
"services",
"IDs",
"returned",
"for",
"usage",
"in",
"MN",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/client/Route53AutoNamingClient.java#L170-L181 |
129,959 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/aws/route53/registration/ServiceRegistrationStatusTask.java | ServiceRegistrationStatusTask.run | @Override
public void run() {
while (!registered) {
GetOperationRequest operationRequest = new GetOperationRequest().withOperationId(operationId);
GetOperationResult result = discoveryClient.getOperation(operationRequest);
if (LOG.isInfoEnabled()) {
... | java | @Override
public void run() {
while (!registered) {
GetOperationRequest operationRequest = new GetOperationRequest().withOperationId(operationId);
GetOperationResult result = discoveryClient.getOperation(operationRequest);
if (LOG.isInfoEnabled()) {
... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"while",
"(",
"!",
"registered",
")",
"{",
"GetOperationRequest",
"operationRequest",
"=",
"new",
"GetOperationRequest",
"(",
")",
".",
"withOperationId",
"(",
"operationId",
")",
";",
"GetOperationResult"... | Runs the polling process to AWS checks every 5 seconds. | [
"Runs",
"the",
"polling",
"process",
"to",
"AWS",
"checks",
"every",
"5",
"seconds",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/registration/ServiceRegistrationStatusTask.java#L67-L95 |
129,960 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/client/EndpointUtil.java | EndpointUtil.getEC2DiscoveryUrlsFromZone | private static Set<String> getEC2DiscoveryUrlsFromZone(String dnsName, DiscoveryUrlType type) {
Set<String> eipsForZone;
try {
dnsName = "txt." + dnsName;
LOG.debug("The zone url to be looked up is {} :", dnsName);
Set<String> ec2UrlsForZone = DnsResolver.getCNamesFro... | java | private static Set<String> getEC2DiscoveryUrlsFromZone(String dnsName, DiscoveryUrlType type) {
Set<String> eipsForZone;
try {
dnsName = "txt." + dnsName;
LOG.debug("The zone url to be looked up is {} :", dnsName);
Set<String> ec2UrlsForZone = DnsResolver.getCNamesFro... | [
"private",
"static",
"Set",
"<",
"String",
">",
"getEC2DiscoveryUrlsFromZone",
"(",
"String",
"dnsName",
",",
"DiscoveryUrlType",
"type",
")",
"{",
"Set",
"<",
"String",
">",
"eipsForZone",
";",
"try",
"{",
"dnsName",
"=",
"\"txt.\"",
"+",
"dnsName",
";",
"L... | Get the list of EC2 URLs given the zone name.
@param dnsName The dns name of the zone-specific CNAME
@param type CNAME or EIP that needs to be retrieved
@return The list of EC2 URLs associated with the dns name | [
"Get",
"the",
"list",
"of",
"EC2",
"URLs",
"given",
"the",
"zone",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/client/EndpointUtil.java#L191-L223 |
129,961 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/io/scan/DefaultClassPathResourceLoader.java | DefaultClassPathResourceLoader.getResourceAsStream | public Optional<InputStream> getResourceAsStream(String path) {
if (!isDirectory(path)) {
return Optional.ofNullable(classLoader.getResourceAsStream(prefixPath(path)));
}
return Optional.empty();
} | java | public Optional<InputStream> getResourceAsStream(String path) {
if (!isDirectory(path)) {
return Optional.ofNullable(classLoader.getResourceAsStream(prefixPath(path)));
}
return Optional.empty();
} | [
"public",
"Optional",
"<",
"InputStream",
">",
"getResourceAsStream",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"!",
"isDirectory",
"(",
"path",
")",
")",
"{",
"return",
"Optional",
".",
"ofNullable",
"(",
"classLoader",
".",
"getResourceAsStream",
"(",
"p... | Obtains a resource as a stream.
@param path The path
@return An optional resource | [
"Obtains",
"a",
"resource",
"as",
"a",
"stream",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/io/scan/DefaultClassPathResourceLoader.java#L75-L80 |
129,962 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/io/scan/DefaultClassPathResourceLoader.java | DefaultClassPathResourceLoader.getResource | public Optional<URL> getResource(String path) {
boolean isDirectory = isDirectory(path);
if (!isDirectory) {
URL url = classLoader.getResource(prefixPath(path));
return Optional.ofNullable(url);
}
return Optional.empty();
} | java | public Optional<URL> getResource(String path) {
boolean isDirectory = isDirectory(path);
if (!isDirectory) {
URL url = classLoader.getResource(prefixPath(path));
return Optional.ofNullable(url);
}
return Optional.empty();
} | [
"public",
"Optional",
"<",
"URL",
">",
"getResource",
"(",
"String",
"path",
")",
"{",
"boolean",
"isDirectory",
"=",
"isDirectory",
"(",
"path",
")",
";",
"if",
"(",
"!",
"isDirectory",
")",
"{",
"URL",
"url",
"=",
"classLoader",
".",
"getResource",
"("... | Obtains a resource URL.
@param path The path
@return An optional resource | [
"Obtains",
"a",
"resource",
"URL",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/io/scan/DefaultClassPathResourceLoader.java#L88-L96 |
129,963 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/io/scan/DefaultClassPathResourceLoader.java | DefaultClassPathResourceLoader.getResources | public Stream<URL> getResources(String path) {
Enumeration<URL> all;
try {
all = classLoader.getResources(prefixPath(path));
} catch (IOException e) {
return Stream.empty();
}
Stream.Builder<URL> builder = Stream.builder();
while (all.hasMoreElemen... | java | public Stream<URL> getResources(String path) {
Enumeration<URL> all;
try {
all = classLoader.getResources(prefixPath(path));
} catch (IOException e) {
return Stream.empty();
}
Stream.Builder<URL> builder = Stream.builder();
while (all.hasMoreElemen... | [
"public",
"Stream",
"<",
"URL",
">",
"getResources",
"(",
"String",
"path",
")",
"{",
"Enumeration",
"<",
"URL",
">",
"all",
";",
"try",
"{",
"all",
"=",
"classLoader",
".",
"getResources",
"(",
"prefixPath",
"(",
"path",
")",
")",
";",
"}",
"catch",
... | Obtains a stream of resource URLs.
@param path The path
@return A resource stream | [
"Obtains",
"a",
"stream",
"of",
"resource",
"URLs",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/io/scan/DefaultClassPathResourceLoader.java#L104-L117 |
129,964 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.simpleBinaryNameFor | String simpleBinaryNameFor(TypeElement typeElement) {
Name elementBinaryName = elementUtils.getBinaryName(typeElement);
PackageElement packageElement = elementUtils.getPackageOf(typeElement);
String packageName = packageElement.getQualifiedName().toString();
return elementBinaryName.toS... | java | String simpleBinaryNameFor(TypeElement typeElement) {
Name elementBinaryName = elementUtils.getBinaryName(typeElement);
PackageElement packageElement = elementUtils.getPackageOf(typeElement);
String packageName = packageElement.getQualifiedName().toString();
return elementBinaryName.toS... | [
"String",
"simpleBinaryNameFor",
"(",
"TypeElement",
"typeElement",
")",
"{",
"Name",
"elementBinaryName",
"=",
"elementUtils",
".",
"getBinaryName",
"(",
"typeElement",
")",
";",
"PackageElement",
"packageElement",
"=",
"elementUtils",
".",
"getPackageOf",
"(",
"type... | The binary name of the type as a String.
@param typeElement The type element
@return The class name | [
"The",
"binary",
"name",
"of",
"the",
"type",
"as",
"a",
"String",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L103-L109 |
129,965 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.getterNameFor | String getterNameFor(Element field) {
String methodNamePrefix = "get";
if (field.asType().getKind() == TypeKind.BOOLEAN) {
methodNamePrefix = "is";
}
return methodNamePrefix + NameUtils.capitalize(field.getSimpleName().toString());
} | java | String getterNameFor(Element field) {
String methodNamePrefix = "get";
if (field.asType().getKind() == TypeKind.BOOLEAN) {
methodNamePrefix = "is";
}
return methodNamePrefix + NameUtils.capitalize(field.getSimpleName().toString());
} | [
"String",
"getterNameFor",
"(",
"Element",
"field",
")",
"{",
"String",
"methodNamePrefix",
"=",
"\"get\"",
";",
"if",
"(",
"field",
".",
"asType",
"(",
")",
".",
"getKind",
"(",
")",
"==",
"TypeKind",
".",
"BOOLEAN",
")",
"{",
"methodNamePrefix",
"=",
"... | The name of a getter for the given field.
@param field The field in question
@return The getter name | [
"The",
"name",
"of",
"a",
"getter",
"for",
"the",
"given",
"field",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L189-L195 |
129,966 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.concreteConstructorFor | @Nullable
public ExecutableElement concreteConstructorFor(TypeElement classElement, AnnotationUtils annotationUtils) {
List<ExecutableElement> constructors = findNonPrivateConstructors(classElement);
if (constructors.isEmpty()) {
return null;
}
if (constructors.size() == ... | java | @Nullable
public ExecutableElement concreteConstructorFor(TypeElement classElement, AnnotationUtils annotationUtils) {
List<ExecutableElement> constructors = findNonPrivateConstructors(classElement);
if (constructors.isEmpty()) {
return null;
}
if (constructors.size() == ... | [
"@",
"Nullable",
"public",
"ExecutableElement",
"concreteConstructorFor",
"(",
"TypeElement",
"classElement",
",",
"AnnotationUtils",
"annotationUtils",
")",
"{",
"List",
"<",
"ExecutableElement",
">",
"constructors",
"=",
"findNonPrivateConstructors",
"(",
"classElement",
... | The constructor inject for the given class element.
@param classElement The class element
@param annotationUtils The annotation utilities
@return The constructor | [
"The",
"constructor",
"inject",
"for",
"the",
"given",
"class",
"element",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L214-L235 |
129,967 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.findAccessibleNoArgumentInstanceMethod | Optional<ExecutableElement> findAccessibleNoArgumentInstanceMethod(TypeElement classElement, String methodName) {
return ElementFilter.methodsIn(elementUtils.getAllMembers(classElement))
.stream().filter(m -> m.getSimpleName().toString().equals(methodName) && !isPrivate(m) && !isStatic(m))
... | java | Optional<ExecutableElement> findAccessibleNoArgumentInstanceMethod(TypeElement classElement, String methodName) {
return ElementFilter.methodsIn(elementUtils.getAllMembers(classElement))
.stream().filter(m -> m.getSimpleName().toString().equals(methodName) && !isPrivate(m) && !isStatic(m))
... | [
"Optional",
"<",
"ExecutableElement",
">",
"findAccessibleNoArgumentInstanceMethod",
"(",
"TypeElement",
"classElement",
",",
"String",
"methodName",
")",
"{",
"return",
"ElementFilter",
".",
"methodsIn",
"(",
"elementUtils",
".",
"getAllMembers",
"(",
"classElement",
"... | Finds a no argument method of the given name.
@param classElement The class element
@param methodName The method name
@return The executable element | [
"Finds",
"a",
"no",
"argument",
"method",
"of",
"the",
"given",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L256-L260 |
129,968 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.classOfPrimitiveFor | Class<?> classOfPrimitiveFor(String primitiveType) {
return ClassUtils.getPrimitiveType(primitiveType).orElseThrow(() -> new IllegalArgumentException("Unknown primitive type: " + primitiveType));
} | java | Class<?> classOfPrimitiveFor(String primitiveType) {
return ClassUtils.getPrimitiveType(primitiveType).orElseThrow(() -> new IllegalArgumentException("Unknown primitive type: " + primitiveType));
} | [
"Class",
"<",
"?",
">",
"classOfPrimitiveFor",
"(",
"String",
"primitiveType",
")",
"{",
"return",
"ClassUtils",
".",
"getPrimitiveType",
"(",
"primitiveType",
")",
".",
"orElseThrow",
"(",
"(",
")",
"->",
"new",
"IllegalArgumentException",
"(",
"\"Unknown primiti... | Obtains the class for a given primitive type name.
@param primitiveType The primitive type name
@return The primtitive type class | [
"Obtains",
"the",
"class",
"for",
"a",
"given",
"primitive",
"type",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L268-L270 |
129,969 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.classOfPrimitiveArrayFor | Class<?> classOfPrimitiveArrayFor(String primitiveType) {
return ClassUtils.arrayTypeForPrimitive(primitiveType)
.orElseThrow(() -> new IllegalArgumentException("Unsupported primitive type " + primitiveType));
} | java | Class<?> classOfPrimitiveArrayFor(String primitiveType) {
return ClassUtils.arrayTypeForPrimitive(primitiveType)
.orElseThrow(() -> new IllegalArgumentException("Unsupported primitive type " + primitiveType));
} | [
"Class",
"<",
"?",
">",
"classOfPrimitiveArrayFor",
"(",
"String",
"primitiveType",
")",
"{",
"return",
"ClassUtils",
".",
"arrayTypeForPrimitive",
"(",
"primitiveType",
")",
".",
"orElseThrow",
"(",
"(",
")",
"->",
"new",
"IllegalArgumentException",
"(",
"\"Unsup... | Obtains the class for the given primitive type array.
@param primitiveType The primitive type
@return The class | [
"Obtains",
"the",
"class",
"for",
"the",
"given",
"primitive",
"type",
"array",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L278-L281 |
129,970 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.superClassFor | TypeElement superClassFor(TypeElement element) {
TypeMirror superclass = element.getSuperclass();
if (superclass.getKind() == TypeKind.NONE) {
return null;
}
DeclaredType kind = (DeclaredType) superclass;
return (TypeElement) kind.asElement();
} | java | TypeElement superClassFor(TypeElement element) {
TypeMirror superclass = element.getSuperclass();
if (superclass.getKind() == TypeKind.NONE) {
return null;
}
DeclaredType kind = (DeclaredType) superclass;
return (TypeElement) kind.asElement();
} | [
"TypeElement",
"superClassFor",
"(",
"TypeElement",
"element",
")",
"{",
"TypeMirror",
"superclass",
"=",
"element",
".",
"getSuperclass",
"(",
")",
";",
"if",
"(",
"superclass",
".",
"getKind",
"(",
")",
"==",
"TypeKind",
".",
"NONE",
")",
"{",
"return",
... | Obtains the super type element for a given type element.
@param element The type element
@return The super type element or null if none exists | [
"Obtains",
"the",
"super",
"type",
"element",
"for",
"a",
"given",
"type",
"element",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L289-L296 |
129,971 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.resolveTypeName | String resolveTypeName(TypeMirror type) {
Object reference = resolveTypeReference(type);
if (reference instanceof Class) {
return ((Class) reference).getName();
}
return reference.toString();
} | java | String resolveTypeName(TypeMirror type) {
Object reference = resolveTypeReference(type);
if (reference instanceof Class) {
return ((Class) reference).getName();
}
return reference.toString();
} | [
"String",
"resolveTypeName",
"(",
"TypeMirror",
"type",
")",
"{",
"Object",
"reference",
"=",
"resolveTypeReference",
"(",
"type",
")",
";",
"if",
"(",
"reference",
"instanceof",
"Class",
")",
"{",
"return",
"(",
"(",
"Class",
")",
"reference",
")",
".",
"... | Resolves a type name for the given name.
@param type The type
@return The type reference | [
"Resolves",
"a",
"type",
"name",
"for",
"the",
"given",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L355-L361 |
129,972 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.isPackagePrivate | boolean isPackagePrivate(Element element) {
Set<Modifier> modifiers = element.getModifiers();
return !(modifiers.contains(PUBLIC)
|| modifiers.contains(PROTECTED)
|| modifiers.contains(PRIVATE));
} | java | boolean isPackagePrivate(Element element) {
Set<Modifier> modifiers = element.getModifiers();
return !(modifiers.contains(PUBLIC)
|| modifiers.contains(PROTECTED)
|| modifiers.contains(PRIVATE));
} | [
"boolean",
"isPackagePrivate",
"(",
"Element",
"element",
")",
"{",
"Set",
"<",
"Modifier",
">",
"modifiers",
"=",
"element",
".",
"getModifiers",
"(",
")",
";",
"return",
"!",
"(",
"modifiers",
".",
"contains",
"(",
"PUBLIC",
")",
"||",
"modifiers",
".",
... | Returns whether an element is package private.
@param element The element
@return True if it is package provide | [
"Returns",
"whether",
"an",
"element",
"is",
"package",
"private",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L404-L409 |
129,973 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.isInheritedAndNotPublic | boolean isInheritedAndNotPublic(TypeElement concreteClass, TypeElement declaringClass, Element methodOrField) {
PackageElement packageOfDeclaringClass = elementUtils.getPackageOf(declaringClass);
PackageElement packageOfConcreteClass = elementUtils.getPackageOf(concreteClass);
return declaringC... | java | boolean isInheritedAndNotPublic(TypeElement concreteClass, TypeElement declaringClass, Element methodOrField) {
PackageElement packageOfDeclaringClass = elementUtils.getPackageOf(declaringClass);
PackageElement packageOfConcreteClass = elementUtils.getPackageOf(concreteClass);
return declaringC... | [
"boolean",
"isInheritedAndNotPublic",
"(",
"TypeElement",
"concreteClass",
",",
"TypeElement",
"declaringClass",
",",
"Element",
"methodOrField",
")",
"{",
"PackageElement",
"packageOfDeclaringClass",
"=",
"elementUtils",
".",
"getPackageOf",
"(",
"declaringClass",
")",
"... | Return whether the given method or field is inherited but not public.
@param concreteClass The concrete class
@param declaringClass The declaring class of the field
@param methodOrField The method or field
@return True if it is inherited and not public | [
"Return",
"whether",
"the",
"given",
"method",
"or",
"field",
"is",
"inherited",
"but",
"not",
"public",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L419-L426 |
129,974 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.overridingOrHidingMethod | Optional<ExecutableElement> overridingOrHidingMethod(ExecutableElement overridden, TypeElement classElement) {
List<ExecutableElement> methods = ElementFilter.methodsIn(elementUtils.getAllMembers(classElement));
for (ExecutableElement method : methods) {
if (!method.equals(overridden) && met... | java | Optional<ExecutableElement> overridingOrHidingMethod(ExecutableElement overridden, TypeElement classElement) {
List<ExecutableElement> methods = ElementFilter.methodsIn(elementUtils.getAllMembers(classElement));
for (ExecutableElement method : methods) {
if (!method.equals(overridden) && met... | [
"Optional",
"<",
"ExecutableElement",
">",
"overridingOrHidingMethod",
"(",
"ExecutableElement",
"overridden",
",",
"TypeElement",
"classElement",
")",
"{",
"List",
"<",
"ExecutableElement",
">",
"methods",
"=",
"ElementFilter",
".",
"methodsIn",
"(",
"elementUtils",
... | Tests if candidate method is overridden from a given class or subclass.
@param overridden the candidate overridden method
@param classElement the type element that may contain the overriding method, either directly or in a subclass
@return the overriding method | [
"Tests",
"if",
"candidate",
"method",
"is",
"overridden",
"from",
"a",
"given",
"class",
"or",
"subclass",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L435-L451 |
129,975 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java | ModelUtils.isOptional | boolean isOptional(TypeMirror mirror) {
return typeUtils.erasure(mirror).toString().equals(Optional.class.getName());
} | java | boolean isOptional(TypeMirror mirror) {
return typeUtils.erasure(mirror).toString().equals(Optional.class.getName());
} | [
"boolean",
"isOptional",
"(",
"TypeMirror",
"mirror",
")",
"{",
"return",
"typeUtils",
".",
"erasure",
"(",
"mirror",
")",
".",
"toString",
"(",
")",
".",
"equals",
"(",
"Optional",
".",
"class",
".",
"getName",
"(",
")",
")",
";",
"}"
] | Is the given type mirror an optional.
@param mirror The mirror
@return True if it is | [
"Is",
"the",
"given",
"type",
"mirror",
"an",
"optional",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L520-L522 |
129,976 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/client/DiscoveryClientConfiguration.java | DiscoveryClientConfiguration.setDefaultZone | public void setDefaultZone(List<URL> defaultZone) {
this.defaultZone = defaultZone
.stream()
.map(uriMapper())
.map(uri -> ServiceInstance.builder(getServiceID(), uri).build())
.collect(Collectors.toList());
} | java | public void setDefaultZone(List<URL> defaultZone) {
this.defaultZone = defaultZone
.stream()
.map(uriMapper())
.map(uri -> ServiceInstance.builder(getServiceID(), uri).build())
.collect(Collectors.toList());
} | [
"public",
"void",
"setDefaultZone",
"(",
"List",
"<",
"URL",
">",
"defaultZone",
")",
"{",
"this",
".",
"defaultZone",
"=",
"defaultZone",
".",
"stream",
"(",
")",
".",
"map",
"(",
"uriMapper",
"(",
")",
")",
".",
"map",
"(",
"uri",
"->",
"ServiceInsta... | Sets the Discovery servers to use for the default zone.
@param defaultZone The default zone | [
"Sets",
"the",
"Discovery",
"servers",
"to",
"use",
"for",
"the",
"default",
"zone",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/client/DiscoveryClientConfiguration.java#L132-L138 |
129,977 | micronaut-projects/micronaut-core | discovery-client/src/main/java/io/micronaut/discovery/client/DiscoveryClientConfiguration.java | DiscoveryClientConfiguration.setZones | public void setZones(Map<String, List<URL>> zones) {
if (zones != null) {
this.otherZones = zones.entrySet()
.stream()
.flatMap((Function<Map.Entry<String, List<URL>>, Stream<ServiceInstance>>) entry ->
entry.getValue()
.str... | java | public void setZones(Map<String, List<URL>> zones) {
if (zones != null) {
this.otherZones = zones.entrySet()
.stream()
.flatMap((Function<Map.Entry<String, List<URL>>, Stream<ServiceInstance>>) entry ->
entry.getValue()
.str... | [
"public",
"void",
"setZones",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"URL",
">",
">",
"zones",
")",
"{",
"if",
"(",
"zones",
"!=",
"null",
")",
"{",
"this",
".",
"otherZones",
"=",
"zones",
".",
"entrySet",
"(",
")",
".",
"stream",
"(",
")"... | Configures Discovery servers in other zones.
@param zones The zones | [
"Configures",
"Discovery",
"servers",
"in",
"other",
"zones",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/client/DiscoveryClientConfiguration.java#L155-L170 |
129,978 | micronaut-projects/micronaut-core | http-netty/src/main/java/io/micronaut/http/netty/NettyHttpHeaders.java | NettyHttpHeaders.setNettyHeaders | void setNettyHeaders(io.netty.handler.codec.http.HttpHeaders headers) {
this.nettyHeaders = headers;
} | java | void setNettyHeaders(io.netty.handler.codec.http.HttpHeaders headers) {
this.nettyHeaders = headers;
} | [
"void",
"setNettyHeaders",
"(",
"io",
".",
"netty",
".",
"handler",
".",
"codec",
".",
"http",
".",
"HttpHeaders",
"headers",
")",
"{",
"this",
".",
"nettyHeaders",
"=",
"headers",
";",
"}"
] | Sets the underlying netty headers.
@param headers The Netty http headers | [
"Sets",
"the",
"underlying",
"netty",
"headers",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http-netty/src/main/java/io/micronaut/http/netty/NettyHttpHeaders.java#L72-L74 |
129,979 | micronaut-projects/micronaut-core | inject-java/src/main/java/io/micronaut/annotation/processing/PublicMethodVisitor.java | PublicMethodVisitor.isAcceptable | @Override
protected boolean isAcceptable(Element element) {
if (element.getKind() == ElementKind.METHOD) {
Set<Modifier> modifiers = element.getModifiers();
return modifiers.contains(Modifier.PUBLIC) && !modifiers.contains(Modifier.FINAL) && !modifiers.contains(Modifier.STATIC);
... | java | @Override
protected boolean isAcceptable(Element element) {
if (element.getKind() == ElementKind.METHOD) {
Set<Modifier> modifiers = element.getModifiers();
return modifiers.contains(Modifier.PUBLIC) && !modifiers.contains(Modifier.FINAL) && !modifiers.contains(Modifier.STATIC);
... | [
"@",
"Override",
"protected",
"boolean",
"isAcceptable",
"(",
"Element",
"element",
")",
"{",
"if",
"(",
"element",
".",
"getKind",
"(",
")",
"==",
"ElementKind",
".",
"METHOD",
")",
"{",
"Set",
"<",
"Modifier",
">",
"modifiers",
"=",
"element",
".",
"ge... | Only accepts public non file or static methods.
@param element The {@link Element}
@return If the element is acceptable | [
"Only",
"accepts",
"public",
"non",
"file",
"or",
"static",
"methods",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/PublicMethodVisitor.java#L52-L60 |
129,980 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/context/RequiresCondition.java | RequiresCondition.processPostStartRequirements | private void processPostStartRequirements(ConditionContext context, AnnotationValue<Requires> requirements) {
processPreStartRequirements(context, requirements);
if (context.isFailing()) {
return;
}
if (!matchesPresenceOfBeans(context, requirements)) {
return;
... | java | private void processPostStartRequirements(ConditionContext context, AnnotationValue<Requires> requirements) {
processPreStartRequirements(context, requirements);
if (context.isFailing()) {
return;
}
if (!matchesPresenceOfBeans(context, requirements)) {
return;
... | [
"private",
"void",
"processPostStartRequirements",
"(",
"ConditionContext",
"context",
",",
"AnnotationValue",
"<",
"Requires",
">",
"requirements",
")",
"{",
"processPreStartRequirements",
"(",
"context",
",",
"requirements",
")",
";",
"if",
"(",
"context",
".",
"i... | This method will run conditions that require all beans to be loaded. These conditions included "beans", "missingBeans" and custom conditions. | [
"This",
"method",
"will",
"run",
"conditions",
"that",
"require",
"all",
"beans",
"to",
"be",
"loaded",
".",
"These",
"conditions",
"included",
"beans",
"missingBeans",
"and",
"custom",
"conditions",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/RequiresCondition.java#L173-L189 |
129,981 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/util/ArgumentUtils.java | ArgumentUtils.check | public static <T> ArgumentCheck check(String name, T value) {
return new ArgumentCheck<>(name, value);
} | java | public static <T> ArgumentCheck check(String name, T value) {
return new ArgumentCheck<>(name, value);
} | [
"public",
"static",
"<",
"T",
">",
"ArgumentCheck",
"check",
"(",
"String",
"name",
",",
"T",
"value",
")",
"{",
"return",
"new",
"ArgumentCheck",
"<>",
"(",
"name",
",",
"value",
")",
";",
"}"
] | Perform a check on an argument.
@param name The name of the argument
@param value The value of the argument
@param <T> The value type
@return The {@link ArgumentCheck} | [
"Perform",
"a",
"check",
"on",
"an",
"argument",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/ArgumentUtils.java#L90-L92 |
129,982 | micronaut-projects/micronaut-core | http/src/main/java/io/micronaut/http/hateoas/AbstractResource.java | AbstractResource.setLinks | @SuppressWarnings("unchecked")
@Internal
protected final void setLinks(Map<String, Object> links) {
for (Map.Entry<String, Object> entry : links.entrySet()) {
String name = entry.getKey();
Object value = entry.getValue();
if (value instanceof Map) {
Ma... | java | @SuppressWarnings("unchecked")
@Internal
protected final void setLinks(Map<String, Object> links) {
for (Map.Entry<String, Object> entry : links.entrySet()) {
String name = entry.getKey();
Object value = entry.getValue();
if (value instanceof Map) {
Ma... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Internal",
"protected",
"final",
"void",
"setLinks",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"links",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Object",
">",
"entry",
... | Allows de-serializing of links with Jackson.
@param links The links | [
"Allows",
"de",
"-",
"serializing",
"of",
"links",
"with",
"Jackson",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http/src/main/java/io/micronaut/http/hateoas/AbstractResource.java#L139-L150 |
129,983 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/annotation/AnnotationValueBuilder.java | AnnotationValueBuilder.member | public AnnotationValueBuilder<T> member(String name, long i) {
values.put(name, i);
return this;
} | java | public AnnotationValueBuilder<T> member(String name, long i) {
values.put(name, i);
return this;
} | [
"public",
"AnnotationValueBuilder",
"<",
"T",
">",
"member",
"(",
"String",
"name",
",",
"long",
"i",
")",
"{",
"values",
".",
"put",
"(",
"name",
",",
"i",
")",
";",
"return",
"this",
";",
"}"
] | Sets the value member to the given long value.
@param name The name of the member
@param i The long
@return This builder | [
"Sets",
"the",
"value",
"member",
"to",
"the",
"given",
"long",
"value",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/annotation/AnnotationValueBuilder.java#L236-L239 |
129,984 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/annotation/AnnotationValueBuilder.java | AnnotationValueBuilder.member | public AnnotationValueBuilder<T> member(String name, boolean bool) {
values.put(name, bool);
return this;
} | java | public AnnotationValueBuilder<T> member(String name, boolean bool) {
values.put(name, bool);
return this;
} | [
"public",
"AnnotationValueBuilder",
"<",
"T",
">",
"member",
"(",
"String",
"name",
",",
"boolean",
"bool",
")",
"{",
"values",
".",
"put",
"(",
"name",
",",
"bool",
")",
";",
"return",
"this",
";",
"}"
] | Sets the value member to the given boolean value.
@param name The name of the member
@param bool The boolean
@return This builder | [
"Sets",
"the",
"value",
"member",
"to",
"the",
"given",
"boolean",
"value",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/annotation/AnnotationValueBuilder.java#L290-L293 |
129,985 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java | ReflectionUtils.isSetter | public static boolean isSetter(String name, Class[] args) {
if (StringUtils.isEmpty(name) || args == null) {
return false;
}
if (args.length != 1) {
return false;
}
return NameUtils.isSetterName(name);
} | java | public static boolean isSetter(String name, Class[] args) {
if (StringUtils.isEmpty(name) || args == null) {
return false;
}
if (args.length != 1) {
return false;
}
return NameUtils.isSetterName(name);
} | [
"public",
"static",
"boolean",
"isSetter",
"(",
"String",
"name",
",",
"Class",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"name",
")",
"||",
"args",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"a... | Is the method a setter.
@param name The method name
@param args The arguments
@return True if it is | [
"Is",
"the",
"method",
"a",
"setter",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L100-L109 |
129,986 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java | ReflectionUtils.getWrapperType | public static Class getWrapperType(Class primitiveType) {
if (primitiveType.isPrimitive()) {
return PRIMITIVES_TO_WRAPPERS.get(primitiveType);
}
return primitiveType;
} | java | public static Class getWrapperType(Class primitiveType) {
if (primitiveType.isPrimitive()) {
return PRIMITIVES_TO_WRAPPERS.get(primitiveType);
}
return primitiveType;
} | [
"public",
"static",
"Class",
"getWrapperType",
"(",
"Class",
"primitiveType",
")",
"{",
"if",
"(",
"primitiveType",
".",
"isPrimitive",
"(",
")",
")",
"{",
"return",
"PRIMITIVES_TO_WRAPPERS",
".",
"get",
"(",
"primitiveType",
")",
";",
"}",
"return",
"primitiv... | Obtain the wrapper type for the given primitive.
@param primitiveType The primitive type
@return The wrapper type | [
"Obtain",
"the",
"wrapper",
"type",
"for",
"the",
"given",
"primitive",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L117-L122 |
129,987 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java | ReflectionUtils.getPrimitiveType | public static Class getPrimitiveType(Class wrapperType) {
Class<?> wrapper = WRAPPER_TO_PRIMITIVE.get(wrapperType);
if (wrapper != null) {
return wrapper;
}
return wrapperType;
} | java | public static Class getPrimitiveType(Class wrapperType) {
Class<?> wrapper = WRAPPER_TO_PRIMITIVE.get(wrapperType);
if (wrapper != null) {
return wrapper;
}
return wrapperType;
} | [
"public",
"static",
"Class",
"getPrimitiveType",
"(",
"Class",
"wrapperType",
")",
"{",
"Class",
"<",
"?",
">",
"wrapper",
"=",
"WRAPPER_TO_PRIMITIVE",
".",
"get",
"(",
"wrapperType",
")",
";",
"if",
"(",
"wrapper",
"!=",
"null",
")",
"{",
"return",
"wrapp... | Obtain the primitive type for the given wrapper type.
@param wrapperType The primitive type
@return The wrapper type | [
"Obtain",
"the",
"primitive",
"type",
"for",
"the",
"given",
"wrapper",
"type",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L130-L136 |
129,988 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java | ReflectionUtils.getMethod | public static Optional<Method> getMethod(Class type, String methodName, Class... argTypes) {
try {
return Optional.of(type.getMethod(methodName, argTypes));
} catch (NoSuchMethodException e) {
return findMethod(type, methodName, argTypes);
}
} | java | public static Optional<Method> getMethod(Class type, String methodName, Class... argTypes) {
try {
return Optional.of(type.getMethod(methodName, argTypes));
} catch (NoSuchMethodException e) {
return findMethod(type, methodName, argTypes);
}
} | [
"public",
"static",
"Optional",
"<",
"Method",
">",
"getMethod",
"(",
"Class",
"type",
",",
"String",
"methodName",
",",
"Class",
"...",
"argTypes",
")",
"{",
"try",
"{",
"return",
"Optional",
".",
"of",
"(",
"type",
".",
"getMethod",
"(",
"methodName",
... | Obtains a method.
@param type The type
@param methodName The method name
@param argTypes The argument types
@return An optional {@link Method} | [
"Obtains",
"a",
"method",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L162-L168 |
129,989 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java | ReflectionUtils.invokeMethod | public static <R, T> R invokeMethod(T instance, Method method, Object... arguments) {
try {
return (R) method.invoke(instance, arguments);
} catch (IllegalAccessException e) {
throw new InvocationException("Illegal access invoking method [" + method + "]: " + e.getMessage(), e);
... | java | public static <R, T> R invokeMethod(T instance, Method method, Object... arguments) {
try {
return (R) method.invoke(instance, arguments);
} catch (IllegalAccessException e) {
throw new InvocationException("Illegal access invoking method [" + method + "]: " + e.getMessage(), e);
... | [
"public",
"static",
"<",
"R",
",",
"T",
">",
"R",
"invokeMethod",
"(",
"T",
"instance",
",",
"Method",
"method",
",",
"Object",
"...",
"arguments",
")",
"{",
"try",
"{",
"return",
"(",
"R",
")",
"method",
".",
"invoke",
"(",
"instance",
",",
"argumen... | Invokes a method.
@param instance The instance
@param method The method
@param arguments The arguments
@param <R> The return type
@param <T> The instance type
@return The result | [
"Invokes",
"a",
"method",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L196-L204 |
129,990 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java | ReflectionUtils.getRequiredField | public static Field getRequiredField(Class type, String name) {
try {
return type.getDeclaredField(name);
} catch (NoSuchFieldException e) {
Optional<Field> field = findField(type, name);
return field.orElseThrow(() -> new NoSuchFieldError("No field '" + name + "' fou... | java | public static Field getRequiredField(Class type, String name) {
try {
return type.getDeclaredField(name);
} catch (NoSuchFieldException e) {
Optional<Field> field = findField(type, name);
return field.orElseThrow(() -> new NoSuchFieldError("No field '" + name + "' fou... | [
"public",
"static",
"Field",
"getRequiredField",
"(",
"Class",
"type",
",",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"type",
".",
"getDeclaredField",
"(",
"name",
")",
";",
"}",
"catch",
"(",
"NoSuchFieldException",
"e",
")",
"{",
"Optional",
"<",... | Finds a field on the given type for the given name.
@param type The type
@param name The name
@return An {@link Optional} contains the method or empty | [
"Finds",
"a",
"field",
"on",
"the",
"given",
"type",
"for",
"the",
"given",
"name",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L289-L296 |
129,991 | micronaut-projects/micronaut-core | function/src/main/java/io/micronaut/function/executor/FunctionApplication.java | FunctionApplication.exitWithError | static void exitWithError(Boolean isDebug, Exception e) {
System.err.println("Error executing function (Use -x for more information): " + e.getMessage());
if (isDebug) {
System.err.println();
System.err.println("Error Detail");
System.err.println("------------");
... | java | static void exitWithError(Boolean isDebug, Exception e) {
System.err.println("Error executing function (Use -x for more information): " + e.getMessage());
if (isDebug) {
System.err.println();
System.err.println("Error Detail");
System.err.println("------------");
... | [
"static",
"void",
"exitWithError",
"(",
"Boolean",
"isDebug",
",",
"Exception",
"e",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"Error executing function (Use -x for more information): \"",
"+",
"e",
".",
"getMessage",
"(",
")",
")",
";",
"if",
"(",
... | Exit and print an error message if debug flag set.
@param isDebug flag for print error
@param e exception passed in | [
"Exit",
"and",
"print",
"an",
"error",
"message",
"if",
"debug",
"flag",
"set",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/function/src/main/java/io/micronaut/function/executor/FunctionApplication.java#L75-L84 |
129,992 | micronaut-projects/micronaut-core | function/src/main/java/io/micronaut/function/executor/FunctionApplication.java | FunctionApplication.parseData | static void parseData(String[] args, BiConsumer<String, Boolean> data) {
CommandLine commandLine = parseCommandLine(args);
Object value = commandLine.optionValue("d");
if (value != null) {
data.accept(value.toString(), commandLine.hasOption("x"));
} else {
data.ac... | java | static void parseData(String[] args, BiConsumer<String, Boolean> data) {
CommandLine commandLine = parseCommandLine(args);
Object value = commandLine.optionValue("d");
if (value != null) {
data.accept(value.toString(), commandLine.hasOption("x"));
} else {
data.ac... | [
"static",
"void",
"parseData",
"(",
"String",
"[",
"]",
"args",
",",
"BiConsumer",
"<",
"String",
",",
"Boolean",
">",
"data",
")",
"{",
"CommandLine",
"commandLine",
"=",
"parseCommandLine",
"(",
"args",
")",
";",
"Object",
"value",
"=",
"commandLine",
".... | Parse entries.
@param args command line options
@param data data | [
"Parse",
"entries",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/function/src/main/java/io/micronaut/function/executor/FunctionApplication.java#L92-L100 |
129,993 | micronaut-projects/micronaut-core | function/src/main/java/io/micronaut/function/executor/FunctionApplication.java | FunctionApplication.parseCommandLine | static CommandLine parseCommandLine(String[] args) {
return CommandLine.build()
.addOption(DATA_OPTION, "For passing the data")
.addOption(DEBUG_OPTIONS, "For outputting debug information")
.parse(args);
} | java | static CommandLine parseCommandLine(String[] args) {
return CommandLine.build()
.addOption(DATA_OPTION, "For passing the data")
.addOption(DEBUG_OPTIONS, "For outputting debug information")
.parse(args);
} | [
"static",
"CommandLine",
"parseCommandLine",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"return",
"CommandLine",
".",
"build",
"(",
")",
".",
"addOption",
"(",
"DATA_OPTION",
",",
"\"For passing the data\"",
")",
".",
"addOption",
"(",
"DEBUG_OPTIONS",
",",
"\... | Parse command line entries.
@param args command line options
@return command line built with options | [
"Parse",
"command",
"line",
"entries",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/function/src/main/java/io/micronaut/function/executor/FunctionApplication.java#L116-L121 |
129,994 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/annotation/AnnotationMetadataWriter.java | AnnotationMetadataWriter.writeTo | public void writeTo(OutputStream outputStream) {
try {
ClassWriter classWriter = generateClassBytes();
writeClassToDisk(outputStream, classWriter);
} catch (Throwable e) {
throw new ClassGenerationException("Error generating annotation metadata: " + e.getMessage(), e... | java | public void writeTo(OutputStream outputStream) {
try {
ClassWriter classWriter = generateClassBytes();
writeClassToDisk(outputStream, classWriter);
} catch (Throwable e) {
throw new ClassGenerationException("Error generating annotation metadata: " + e.getMessage(), e... | [
"public",
"void",
"writeTo",
"(",
"OutputStream",
"outputStream",
")",
"{",
"try",
"{",
"ClassWriter",
"classWriter",
"=",
"generateClassBytes",
"(",
")",
";",
"writeClassToDisk",
"(",
"outputStream",
",",
"classWriter",
")",
";",
"}",
"catch",
"(",
"Throwable",... | Write the class to the output stream, such a JavaFileObject created from a java annotation processor Filer object.
@param outputStream the output stream pointing to the target class file | [
"Write",
"the",
"class",
"to",
"the",
"output",
"stream",
"such",
"a",
"JavaFileObject",
"created",
"from",
"a",
"java",
"annotation",
"processor",
"Filer",
"object",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/AnnotationMetadataWriter.java#L196-L204 |
129,995 | micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/inject/annotation/AnnotationMetadataWriter.java | AnnotationMetadataWriter.pushAnnotationAttributes | @Internal
private static void pushAnnotationAttributes(Type declaringType, ClassVisitor declaringClassWriter, GeneratorAdapter generatorAdapter, Map<? extends CharSequence, Object> annotationData, Map<String, GeneratorAdapter> loadTypeMethods) {
int totalSize = annotationData.size() * 2;
// start a ... | java | @Internal
private static void pushAnnotationAttributes(Type declaringType, ClassVisitor declaringClassWriter, GeneratorAdapter generatorAdapter, Map<? extends CharSequence, Object> annotationData, Map<String, GeneratorAdapter> loadTypeMethods) {
int totalSize = annotationData.size() * 2;
// start a ... | [
"@",
"Internal",
"private",
"static",
"void",
"pushAnnotationAttributes",
"(",
"Type",
"declaringType",
",",
"ClassVisitor",
"declaringClassWriter",
",",
"GeneratorAdapter",
"generatorAdapter",
",",
"Map",
"<",
"?",
"extends",
"CharSequence",
",",
"Object",
">",
"anno... | Writes annotation attributes to the given generator.
@param declaringClassWriter The declaring class
@param generatorAdapter The generator adapter
@param annotationData The annotation data
@param loadTypeMethods Generated methods that load types | [
"Writes",
"annotation",
"attributes",
"to",
"the",
"given",
"generator",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/AnnotationMetadataWriter.java#L228-L246 |
129,996 | micronaut-projects/micronaut-core | runtime/src/main/java/io/micronaut/cache/DefaultSyncCache.java | DefaultSyncCache.buildCache | protected com.github.benmanes.caffeine.cache.Cache buildCache(CacheConfiguration cacheConfiguration) {
Caffeine<Object, Object> builder = Caffeine.newBuilder();
cacheConfiguration.getExpireAfterAccess().ifPresent(duration -> builder.expireAfterAccess(duration.toMillis(), TimeUnit.MILLISECONDS));
... | java | protected com.github.benmanes.caffeine.cache.Cache buildCache(CacheConfiguration cacheConfiguration) {
Caffeine<Object, Object> builder = Caffeine.newBuilder();
cacheConfiguration.getExpireAfterAccess().ifPresent(duration -> builder.expireAfterAccess(duration.toMillis(), TimeUnit.MILLISECONDS));
... | [
"protected",
"com",
".",
"github",
".",
"benmanes",
".",
"caffeine",
".",
"cache",
".",
"Cache",
"buildCache",
"(",
"CacheConfiguration",
"cacheConfiguration",
")",
"{",
"Caffeine",
"<",
"Object",
",",
"Object",
">",
"builder",
"=",
"Caffeine",
".",
"newBuilde... | Build a cache from the given configurations.
@param cacheConfiguration The cache configurations
@return cache | [
"Build",
"a",
"cache",
"from",
"the",
"given",
"configurations",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/cache/DefaultSyncCache.java#L173-L191 |
129,997 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/version/SemanticVersion.java | SemanticVersion.isAtLeastMajorMinor | public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) {
SemanticVersion semanticVersion = new SemanticVersion(version);
return isAtLeastMajorMinorImpl(semanticVersion, majorVersion, minorVersion);
} | java | public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) {
SemanticVersion semanticVersion = new SemanticVersion(version);
return isAtLeastMajorMinorImpl(semanticVersion, majorVersion, minorVersion);
} | [
"public",
"static",
"boolean",
"isAtLeastMajorMinor",
"(",
"String",
"version",
",",
"int",
"majorVersion",
",",
"int",
"minorVersion",
")",
"{",
"SemanticVersion",
"semanticVersion",
"=",
"new",
"SemanticVersion",
"(",
"version",
")",
";",
"return",
"isAtLeastMajor... | Check whether the current version is at least the given major and minor version.
@param version The version to check
@param majorVersion The major version
@param minorVersion The minor version
@return True if it is | [
"Check",
"whether",
"the",
"current",
"version",
"is",
"at",
"least",
"the",
"given",
"major",
"and",
"minor",
"version",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/version/SemanticVersion.java#L99-L102 |
129,998 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/version/SemanticVersion.java | SemanticVersion.isAtLeast | public static boolean isAtLeast(String version, String requiredVersion) {
if (version != null) {
SemanticVersion thisVersion = new SemanticVersion(version);
SemanticVersion otherVersion = new SemanticVersion(requiredVersion);
return thisVersion.compareTo(otherVersion) != -1;
... | java | public static boolean isAtLeast(String version, String requiredVersion) {
if (version != null) {
SemanticVersion thisVersion = new SemanticVersion(version);
SemanticVersion otherVersion = new SemanticVersion(requiredVersion);
return thisVersion.compareTo(otherVersion) != -1;
... | [
"public",
"static",
"boolean",
"isAtLeast",
"(",
"String",
"version",
",",
"String",
"requiredVersion",
")",
"{",
"if",
"(",
"version",
"!=",
"null",
")",
"{",
"SemanticVersion",
"thisVersion",
"=",
"new",
"SemanticVersion",
"(",
"version",
")",
";",
"Semantic... | Check whether the version is at least the given version.
@param version The version
@param requiredVersion The required version
@return True if it is | [
"Check",
"whether",
"the",
"version",
"is",
"at",
"least",
"the",
"given",
"version",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/version/SemanticVersion.java#L111-L118 |
129,999 | micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/convert/DefaultConversionService.java | DefaultConversionService.findTypeConverter | protected <T> TypeConverter findTypeConverter(Class<?> sourceType, Class<T> targetType, Class<? extends Annotation> formattingAnnotation) {
TypeConverter typeConverter = null;
List<Class> sourceHierarchy = ClassUtils.resolveHierarchy(sourceType);
List<Class> targetHierarchy = ClassUtils.resolveH... | java | protected <T> TypeConverter findTypeConverter(Class<?> sourceType, Class<T> targetType, Class<? extends Annotation> formattingAnnotation) {
TypeConverter typeConverter = null;
List<Class> sourceHierarchy = ClassUtils.resolveHierarchy(sourceType);
List<Class> targetHierarchy = ClassUtils.resolveH... | [
"protected",
"<",
"T",
">",
"TypeConverter",
"findTypeConverter",
"(",
"Class",
"<",
"?",
">",
"sourceType",
",",
"Class",
"<",
"T",
">",
"targetType",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"formattingAnnotation",
")",
"{",
"TypeConverter",
"... | Find the type converter.
@param sourceType sourceType
@param targetType targetType
@param formattingAnnotation formattingAnnotation
@param <T> Generic type
@return type converter | [
"Find",
"the",
"type",
"converter",
"."
] | c31f5b03ce0eb88c2f6470710987db03b8967d5c | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/convert/DefaultConversionService.java#L825-L853 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.