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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8,400 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java | JRebirthThread.manageStyleSheetReloading | private void manageStyleSheetReloading(final Scene scene) {
if (CoreParameters.DEVELOPER_MODE.get() && scene != null) {
for (final String styleSheet : scene.getStylesheets()) {
getFacade().serviceFacade().retrieve(StyleSheetTrackerService.class).listen(styleSheet, this.application.... | java | private void manageStyleSheetReloading(final Scene scene) {
if (CoreParameters.DEVELOPER_MODE.get() && scene != null) {
for (final String styleSheet : scene.getStylesheets()) {
getFacade().serviceFacade().retrieve(StyleSheetTrackerService.class).listen(styleSheet, this.application.... | [
"private",
"void",
"manageStyleSheetReloading",
"(",
"final",
"Scene",
"scene",
")",
"{",
"if",
"(",
"CoreParameters",
".",
"DEVELOPER_MODE",
".",
"get",
"(",
")",
"&&",
"scene",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"String",
"styleSheet",
":",
"sc... | Manage style sheet reloading by using a custom service provide by JRebirth Core.
@param scene the scene to reload in case of Style Sheet update | [
"Manage",
"style",
"sheet",
"reloading",
"by",
"using",
"a",
"custom",
"service",
"provide",
"by",
"JRebirth",
"Core",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java#L188-L197 |
8,401 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java | JRebirthThread.bootUp | public void bootUp() throws JRebirthThreadException {
final List<Wave> chainedWaveList = new ArrayList<>();
// Manage waves to run before the First node creation
final List<Wave> preBootList = getApplication().preBootWaveList();
if (preBootList != null && !preBootList.isEmpty()) {
... | java | public void bootUp() throws JRebirthThreadException {
final List<Wave> chainedWaveList = new ArrayList<>();
// Manage waves to run before the First node creation
final List<Wave> preBootList = getApplication().preBootWaveList();
if (preBootList != null && !preBootList.isEmpty()) {
... | [
"public",
"void",
"bootUp",
"(",
")",
"throws",
"JRebirthThreadException",
"{",
"final",
"List",
"<",
"Wave",
">",
"chainedWaveList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Manage waves to run before the First node creation",
"final",
"List",
"<",
"Wave",... | Attach the first view and run pre and post command.
@throws JRebirthThreadException if a problem occurred while calling the command | [
"Attach",
"the",
"first",
"view",
"and",
"run",
"pre",
"and",
"post",
"command",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java#L204-L230 |
8,402 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java | JRebirthThread.close | public void close() {
// Infinite loop is still active
if (this.infiniteLoop.get()) {
// First attempt to close the application
this.infiniteLoop.set(false);
} else {
// N-th attempt to close the application
this.forceClose.set(true);
... | java | public void close() {
// Infinite loop is still active
if (this.infiniteLoop.get()) {
// First attempt to close the application
this.infiniteLoop.set(false);
} else {
// N-th attempt to close the application
this.forceClose.set(true);
... | [
"public",
"void",
"close",
"(",
")",
"{",
"// Infinite loop is still active",
"if",
"(",
"this",
".",
"infiniteLoop",
".",
"get",
"(",
")",
")",
"{",
"// First attempt to close the application",
"this",
".",
"infiniteLoop",
".",
"set",
"(",
"false",
")",
";",
... | This method can be called a lot of time while application is running.
The first time to stop the infinite loop, then to purge all queues and let the thread terminate itself. | [
"This",
"method",
"can",
"be",
"called",
"a",
"lot",
"of",
"time",
"while",
"application",
"is",
"running",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java#L248-L263 |
8,403 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java | JRebirthThread.shutdown | private void shutdown() {
try {
this.facade.stop();
this.facade = null;
// Destroy the static reference
destroyInstance();
} catch (final CoreException e) {
LOGGER.log(SHUTDOWN_ERROR, e);
}
} | java | private void shutdown() {
try {
this.facade.stop();
this.facade = null;
// Destroy the static reference
destroyInstance();
} catch (final CoreException e) {
LOGGER.log(SHUTDOWN_ERROR, e);
}
} | [
"private",
"void",
"shutdown",
"(",
")",
"{",
"try",
"{",
"this",
".",
"facade",
".",
"stop",
"(",
")",
";",
"this",
".",
"facade",
"=",
"null",
";",
"// Destroy the static reference",
"destroyInstance",
"(",
")",
";",
"}",
"catch",
"(",
"final",
"CoreEx... | Release all resources. | [
"Release",
"all",
"resources",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java#L268-L277 |
8,404 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java | JRebirthThread.getLaunchFirstViewWave | protected Wave getLaunchFirstViewWave() {
Wave firstWave = null;
// Generates the command wave directly to win a Wave cycle
if (this.application != null && this.application.rootNode() != null && this.application.firstModelClass() != null) {
final UniqueKey<? extends Model> modelKey ... | java | protected Wave getLaunchFirstViewWave() {
Wave firstWave = null;
// Generates the command wave directly to win a Wave cycle
if (this.application != null && this.application.rootNode() != null && this.application.firstModelClass() != null) {
final UniqueKey<? extends Model> modelKey ... | [
"protected",
"Wave",
"getLaunchFirstViewWave",
"(",
")",
"{",
"Wave",
"firstWave",
"=",
"null",
";",
"// Generates the command wave directly to win a Wave cycle",
"if",
"(",
"this",
".",
"application",
"!=",
"null",
"&&",
"this",
".",
"application",
".",
"rootNode",
... | Launch the first view by adding it into the root node.
@return the wave responsible of the creation of the first view | [
"Launch",
"the",
"first",
"view",
"by",
"adding",
"it",
"into",
"the",
"root",
"node",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThread.java#L291-L310 |
8,405 | JRebirth/JRebirth | org.jrebirth.af/processor/src/main/java/org/jrebirth/af/processor/ComponentProcessor.java | ComponentProcessor.createSPIFile | private void createSPIFile(String moduleName) {
try {
final FileObject fo = this.processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", MODULE_STARTER_SPI_PATH);
this.processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "creating spi file: " + fo.toUri());
... | java | private void createSPIFile(String moduleName) {
try {
final FileObject fo = this.processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", MODULE_STARTER_SPI_PATH);
this.processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "creating spi file: " + fo.toUri());
... | [
"private",
"void",
"createSPIFile",
"(",
"String",
"moduleName",
")",
"{",
"try",
"{",
"final",
"FileObject",
"fo",
"=",
"this",
".",
"processingEnv",
".",
"getFiler",
"(",
")",
".",
"createResource",
"(",
"StandardLocation",
".",
"CLASS_OUTPUT",
",",
"\"\"",
... | Creates SPI file to expose the module stater
@param moduleName the name of the module | [
"Creates",
"SPI",
"file",
"to",
"expose",
"the",
"module",
"stater"
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/processor/src/main/java/org/jrebirth/af/processor/ComponentProcessor.java#L124-L137 |
8,406 | JRebirth/JRebirth | org.jrebirth.af/processor/src/main/java/org/jrebirth/af/processor/ComponentProcessor.java | ComponentProcessor.createModuleStarter | private String createModuleStarter(final Map<Class<?>, Set<? extends Element>> annotationMap, ProcessingEnvironment processingEnv) {
String moduleName;
try {
moduleName = getModuleStarterName(processingEnv);
final String starterName = moduleName.substring(moduleName.lastIndexOf('... | java | private String createModuleStarter(final Map<Class<?>, Set<? extends Element>> annotationMap, ProcessingEnvironment processingEnv) {
String moduleName;
try {
moduleName = getModuleStarterName(processingEnv);
final String starterName = moduleName.substring(moduleName.lastIndexOf('... | [
"private",
"String",
"createModuleStarter",
"(",
"final",
"Map",
"<",
"Class",
"<",
"?",
">",
",",
"Set",
"<",
"?",
"extends",
"Element",
">",
">",
"annotationMap",
",",
"ProcessingEnvironment",
"processingEnv",
")",
"{",
"String",
"moduleName",
";",
"try",
... | Creates module stater class according to the annotations
@param annotationMap map of annotations to process
@param processingEnv environment to access facilities the tool framework provides to the processor
@return Module name | [
"Creates",
"module",
"stater",
"class",
"according",
"to",
"the",
"annotations"
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/processor/src/main/java/org/jrebirth/af/processor/ComponentProcessor.java#L146-L200 |
8,407 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/basic/StyleSheetTrackerService.java | StyleSheetTrackerService.listen | public void listen(final String styleSheetPath, final Scene scene) {
final File file = new File(styleSheetPath);
file.lastModified();
// StyleManager.getInstance().reloadStylesheets(scene);
} | java | public void listen(final String styleSheetPath, final Scene scene) {
final File file = new File(styleSheetPath);
file.lastModified();
// StyleManager.getInstance().reloadStylesheets(scene);
} | [
"public",
"void",
"listen",
"(",
"final",
"String",
"styleSheetPath",
",",
"final",
"Scene",
"scene",
")",
"{",
"final",
"File",
"file",
"=",
"new",
"File",
"(",
"styleSheetPath",
")",
";",
"file",
".",
"lastModified",
"(",
")",
";",
"// StyleManager.getInst... | Listen new style sheet path.
@param styleSheetPath the style hseet path
@param scene the root scene | [
"Listen",
"new",
"style",
"sheet",
"path",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/basic/StyleSheetTrackerService.java#L61-L69 |
8,408 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java | AbstractComponent.getWaveTypesString | private String getWaveTypesString(final WaveType[] waveTypes) {
final StringBuilder sb = new StringBuilder();
for (final WaveType waveType : waveTypes) {
sb.append(waveType.toString()).append(" ");
}
return sb.toString();
} | java | private String getWaveTypesString(final WaveType[] waveTypes) {
final StringBuilder sb = new StringBuilder();
for (final WaveType waveType : waveTypes) {
sb.append(waveType.toString()).append(" ");
}
return sb.toString();
} | [
"private",
"String",
"getWaveTypesString",
"(",
"final",
"WaveType",
"[",
"]",
"waveTypes",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"final",
"WaveType",
"waveType",
":",
"waveTypes",
")",
"{",
"sb",
... | Return the human-readable list of Wave Type.
@param waveTypes the list of wave type
@return the string list of Wave Type | [
"Return",
"the",
"human",
"-",
"readable",
"list",
"of",
"Wave",
"Type",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java#L140-L146 |
8,409 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java | AbstractComponent.sendWaveIntoJit | private Wave sendWaveIntoJit(final Wave wave) {
CheckerUtility.checkWave(wave);
wave.status(Status.Sent);
final PriorityLevel priority = wave.contains(JRebirthItems.priority) ? wave.get(JRebirthItems.priority) : PriorityLevel.Normal;
final RunType runType = wave.contains(JRebirthItems... | java | private Wave sendWaveIntoJit(final Wave wave) {
CheckerUtility.checkWave(wave);
wave.status(Status.Sent);
final PriorityLevel priority = wave.contains(JRebirthItems.priority) ? wave.get(JRebirthItems.priority) : PriorityLevel.Normal;
final RunType runType = wave.contains(JRebirthItems... | [
"private",
"Wave",
"sendWaveIntoJit",
"(",
"final",
"Wave",
"wave",
")",
"{",
"CheckerUtility",
".",
"checkWave",
"(",
"wave",
")",
";",
"wave",
".",
"status",
"(",
"Status",
".",
"Sent",
")",
";",
"final",
"PriorityLevel",
"priority",
"=",
"wave",
".",
... | Send the given wave using the JRebirth Thread.
@param wave the wave to send
@return the wave sent to JIT (with Sent status) | [
"Send",
"the",
"given",
"wave",
"using",
"the",
"JRebirth",
"Thread",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java#L285-L299 |
8,410 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java | AbstractComponent.createWave | private Wave createWave(final WaveGroup waveGroup, final WaveType waveType, final Class<?> componentClass, final WaveData<?>... waveData) {
final Wave wave = wave()
.waveGroup(waveGroup)
.waveType(waveType)
.fromCla... | java | private Wave createWave(final WaveGroup waveGroup, final WaveType waveType, final Class<?> componentClass, final WaveData<?>... waveData) {
final Wave wave = wave()
.waveGroup(waveGroup)
.waveType(waveType)
.fromCla... | [
"private",
"Wave",
"createWave",
"(",
"final",
"WaveGroup",
"waveGroup",
",",
"final",
"WaveType",
"waveType",
",",
"final",
"Class",
"<",
"?",
">",
"componentClass",
",",
"final",
"WaveData",
"<",
"?",
">",
"...",
"waveData",
")",
"{",
"final",
"Wave",
"w... | Build a wave object.
@param waveGroup the group of the wave
@param waveType the type of the wave
@param componentClass the component class if any
@param waveData wave data to use
@return the wave built | [
"Build",
"a",
"wave",
"object",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java#L311-L324 |
8,411 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java | AbstractComponent.createWave | private Wave createWave(final WaveGroup waveGroup, final WaveType waveType, final Class<?> componentClass, final WaveBean waveBean, final WaveBean... waveBeans) {
final List<WaveBean> waveBeanList = new ArrayList<>();
waveBeanList.add(waveBean);
if (waveBeans.length > 0) {
waveBeanL... | java | private Wave createWave(final WaveGroup waveGroup, final WaveType waveType, final Class<?> componentClass, final WaveBean waveBean, final WaveBean... waveBeans) {
final List<WaveBean> waveBeanList = new ArrayList<>();
waveBeanList.add(waveBean);
if (waveBeans.length > 0) {
waveBeanL... | [
"private",
"Wave",
"createWave",
"(",
"final",
"WaveGroup",
"waveGroup",
",",
"final",
"WaveType",
"waveType",
",",
"final",
"Class",
"<",
"?",
">",
"componentClass",
",",
"final",
"WaveBean",
"waveBean",
",",
"final",
"WaveBean",
"...",
"waveBeans",
")",
"{",... | Build a wave object with its dedicated WaveBean.
@param waveGroup the group of the wave
@param waveType the type of the wave
@param componentClass the component class if any
@param waveBean the wave bean that holds all required data
@param waveBeans the extra Wave Beans that holds all other required data
@return the ... | [
"Build",
"a",
"wave",
"object",
"with",
"its",
"dedicated",
"WaveBean",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java#L337-L356 |
8,412 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java | AbstractComponent.callAnnotatedMethod | private void callAnnotatedMethod(final Class<? extends Annotation> annotationClass) {
if (this.lifecycleMethod.get(annotationClass.getName()) != null) {
for (final Method method : this.lifecycleMethod.get(annotationClass.getName())) {
try {
ClassUtility.callMetho... | java | private void callAnnotatedMethod(final Class<? extends Annotation> annotationClass) {
if (this.lifecycleMethod.get(annotationClass.getName()) != null) {
for (final Method method : this.lifecycleMethod.get(annotationClass.getName())) {
try {
ClassUtility.callMetho... | [
"private",
"void",
"callAnnotatedMethod",
"(",
"final",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationClass",
")",
"{",
"if",
"(",
"this",
".",
"lifecycleMethod",
".",
"get",
"(",
"annotationClass",
".",
"getName",
"(",
")",
")",
"!=",
"null",
... | Call annotated methods corresponding at given lifecycle annotation.
@param annotationClass the annotation related to the lifecycle | [
"Call",
"annotated",
"methods",
"corresponding",
"at",
"given",
"lifecycle",
"annotation",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java#L473-L484 |
8,413 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java | AbstractComponent.internalRelease | private void internalRelease() {
// try {
// setKey(null);
// getNotifier().unlistenAll(getWaveReady());
callAnnotatedMethod(OnRelease.class);
if (localFacade() != null) {
localFacade().unregister(key());
}
// thisObject.ready = false;
/... | java | private void internalRelease() {
// try {
// setKey(null);
// getNotifier().unlistenAll(getWaveReady());
callAnnotatedMethod(OnRelease.class);
if (localFacade() != null) {
localFacade().unregister(key());
}
// thisObject.ready = false;
/... | [
"private",
"void",
"internalRelease",
"(",
")",
"{",
"// try {",
"// setKey(null);",
"// getNotifier().unlistenAll(getWaveReady());",
"callAnnotatedMethod",
"(",
"OnRelease",
".",
"class",
")",
";",
"if",
"(",
"localFacade",
"(",
")",
"!=",
"null",
")",
"{",
"localF... | Perform the internal release. | [
"Perform",
"the",
"internal",
"release",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/component/basic/AbstractComponent.java#L576-L619 |
8,414 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/sockjs/impl/SockJSSession.java | SockJSSession.close | @Override
public synchronized void close() {
if (endHandler != null) {
endHandler.handle(null);
}
closed = true;
if (listener != null && handleCalled) {
listener.sessionClosed();
}
} | java | @Override
public synchronized void close() {
if (endHandler != null) {
endHandler.handle(null);
}
closed = true;
if (listener != null && handleCalled) {
listener.sessionClosed();
}
} | [
"@",
"Override",
"public",
"synchronized",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"endHandler",
"!=",
"null",
")",
"{",
"endHandler",
".",
"handle",
"(",
"null",
")",
";",
"}",
"closed",
"=",
"true",
";",
"if",
"(",
"listener",
"!=",
"null",
"&&"... | Yes, SockJS is weird, but it's hard to work out expected server behaviour when there's no spec | [
"Yes",
"SockJS",
"is",
"weird",
"but",
"it",
"s",
"hard",
"to",
"work",
"out",
"expected",
"server",
"behaviour",
"when",
"there",
"s",
"no",
"spec"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/sockjs/impl/SockJSSession.java#L184-L193 |
8,415 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/sockjs/impl/SockJSSession.java | SockJSSession.doClose | private void doClose() {
super.close(); // We must call this or handlers don't get unregistered and we get a leak
if (heartbeatID != -1) {
vertx.cancelTimer(heartbeatID);
}
if (timeoutTimerID != -1) {
vertx.cancelTimer(timeoutTimerID);
}
if (id != null) {
// Can be null if webs... | java | private void doClose() {
super.close(); // We must call this or handlers don't get unregistered and we get a leak
if (heartbeatID != -1) {
vertx.cancelTimer(heartbeatID);
}
if (timeoutTimerID != -1) {
vertx.cancelTimer(timeoutTimerID);
}
if (id != null) {
// Can be null if webs... | [
"private",
"void",
"doClose",
"(",
")",
"{",
"super",
".",
"close",
"(",
")",
";",
"// We must call this or handlers don't get unregistered and we get a leak",
"if",
"(",
"heartbeatID",
"!=",
"-",
"1",
")",
"{",
"vertx",
".",
"cancelTimer",
"(",
"heartbeatID",
")"... | Yes, I know it's weird but that's the way SockJS likes it. | [
"Yes",
"I",
"know",
"it",
"s",
"weird",
"but",
"that",
"s",
"the",
"way",
"SockJS",
"likes",
"it",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/sockjs/impl/SockJSSession.java#L298-L317 |
8,416 | JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/controls/ControlsModel.java | ControlsModel.doEventsLoaded | public void doEventsLoaded(final List<JRebirthEvent> eventList, final Wave wave) {
view().activateButtons(!eventList.isEmpty());
} | java | public void doEventsLoaded(final List<JRebirthEvent> eventList, final Wave wave) {
view().activateButtons(!eventList.isEmpty());
} | [
"public",
"void",
"doEventsLoaded",
"(",
"final",
"List",
"<",
"JRebirthEvent",
">",
"eventList",
",",
"final",
"Wave",
"wave",
")",
"{",
"view",
"(",
")",
".",
"activateButtons",
"(",
"!",
"eventList",
".",
"isEmpty",
"(",
")",
")",
";",
"}"
] | Call when event are loaded.
@param eventList the list of events loaded
@param wave the wave received | [
"Call",
"when",
"event",
"are",
"loaded",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/controls/ControlsModel.java#L51-L53 |
8,417 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/BasicAuth.java | BasicAuth.handle401 | private void handle401(final YokeRequest request, final Handler<Object> next) {
YokeResponse response = request.response();
response.putHeader("WWW-Authenticate", "Basic realm=\"" + getRealm(request) + "\"");
response.setStatusCode(401);
next.handle("No authorization token");
} | java | private void handle401(final YokeRequest request, final Handler<Object> next) {
YokeResponse response = request.response();
response.putHeader("WWW-Authenticate", "Basic realm=\"" + getRealm(request) + "\"");
response.setStatusCode(401);
next.handle("No authorization token");
} | [
"private",
"void",
"handle401",
"(",
"final",
"YokeRequest",
"request",
",",
"final",
"Handler",
"<",
"Object",
">",
"next",
")",
"{",
"YokeResponse",
"response",
"=",
"request",
".",
"response",
"(",
")",
";",
"response",
".",
"putHeader",
"(",
"\"WWW-Authe... | Handle all forbidden errors, in this case we need to add a special header to the response
@param request yoke request
@param next middleware to be called next | [
"Handle",
"all",
"forbidden",
"errors",
"in",
"this",
"case",
"we",
"need",
"to",
"add",
"a",
"special",
"header",
"to",
"the",
"response"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/BasicAuth.java#L128-L133 |
8,418 | JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/controls/ControlsView.java | ControlsView.activateButtons | void activateButtons(final boolean enable) {
this.unloadButton.setDisable(!enable);
this.playPauseButton.setDisable(!enable);
this.backwardButton.setDisable(!enable);
this.forwardButton.setDisable(!enable);
this.stopButton.setDisable(!enable);
} | java | void activateButtons(final boolean enable) {
this.unloadButton.setDisable(!enable);
this.playPauseButton.setDisable(!enable);
this.backwardButton.setDisable(!enable);
this.forwardButton.setDisable(!enable);
this.stopButton.setDisable(!enable);
} | [
"void",
"activateButtons",
"(",
"final",
"boolean",
"enable",
")",
"{",
"this",
".",
"unloadButton",
".",
"setDisable",
"(",
"!",
"enable",
")",
";",
"this",
".",
"playPauseButton",
".",
"setDisable",
"(",
"!",
"enable",
")",
";",
"this",
".",
"backwardBut... | Change activation of all buttons.
@param enable true to enable all buttons false otherwise | [
"Change",
"activation",
"of",
"all",
"buttons",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/controls/ControlsView.java#L115-L121 |
8,419 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/fxml/FXMLBuilder.java | FXMLBuilder.buildFXMLComponent | private FXMLComponent buildFXMLComponent(final FXML fxmlParam) {
return FXMLUtils.loadFXML(null, fxmlParam.getFxmlPath() + FXML.FXML_EXT, fxmlParam.getBundlePath());
} | java | private FXMLComponent buildFXMLComponent(final FXML fxmlParam) {
return FXMLUtils.loadFXML(null, fxmlParam.getFxmlPath() + FXML.FXML_EXT, fxmlParam.getBundlePath());
} | [
"private",
"FXMLComponent",
"buildFXMLComponent",
"(",
"final",
"FXML",
"fxmlParam",
")",
"{",
"return",
"FXMLUtils",
".",
"loadFXML",
"(",
"null",
",",
"fxmlParam",
".",
"getFxmlPath",
"(",
")",
"+",
"FXML",
".",
"FXML_EXT",
",",
"fxmlParam",
".",
"getBundleP... | Build a FXML component that embed a node and its FXML controller.
@param fxmlParam the FXMLParams object
@return the FXMLcomponent wrapper object | [
"Build",
"a",
"FXML",
"component",
"that",
"embed",
"a",
"node",
"and",
"its",
"FXML",
"controller",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/fxml/FXMLBuilder.java#L59-L62 |
8,420 | JRebirth/JRebirth | org.jrebirth.af/undoredo/src/main/java/org/jrebirth/af/undoredo/service/UndoRedoService.java | UndoRedoService.stackUp | public void stackUp(final Undoable command) {
// Stack up the command
this.commandStack.add(command);
// Call the redo method of the Undoable command
this.commandStack.get(this.commandStack.size() - 1)
.run(WBuilder.wave().addDatas(WBuilder.waveData(UndoRedoWav... | java | public void stackUp(final Undoable command) {
// Stack up the command
this.commandStack.add(command);
// Call the redo method of the Undoable command
this.commandStack.get(this.commandStack.size() - 1)
.run(WBuilder.wave().addDatas(WBuilder.waveData(UndoRedoWav... | [
"public",
"void",
"stackUp",
"(",
"final",
"Undoable",
"command",
")",
"{",
"// Stack up the command",
"this",
".",
"commandStack",
".",
"add",
"(",
"command",
")",
";",
"// Call the redo method of the Undoable command",
"this",
".",
"commandStack",
".",
"get",
"(",... | Stack up a command.
Move internal index and execute the command by triggering a Redo Wave Command
@param command the command | [
"Stack",
"up",
"a",
"command",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/undoredo/src/main/java/org/jrebirth/af/undoredo/service/UndoRedoService.java#L58-L66 |
8,421 | JRebirth/JRebirth | org.jrebirth.af/undoredo/src/main/java/org/jrebirth/af/undoredo/service/UndoRedoService.java | UndoRedoService.undo | public void undo() {
// If there is at least one command left to undo
if (this.commandStack.size() > 0) {
// Here put the last command on the undone stack
this.undoneStack.add(this.commandStack.get(this.commandStack.size() - 1));
// here remove the last command of th... | java | public void undo() {
// If there is at least one command left to undo
if (this.commandStack.size() > 0) {
// Here put the last command on the undone stack
this.undoneStack.add(this.commandStack.get(this.commandStack.size() - 1));
// here remove the last command of th... | [
"public",
"void",
"undo",
"(",
")",
"{",
"// If there is at least one command left to undo",
"if",
"(",
"this",
".",
"commandStack",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"// Here put the last command on the undone stack",
"this",
".",
"undoneStack",
".",
"add"... | Undo the last command. | [
"Undo",
"the",
"last",
"command",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/undoredo/src/main/java/org/jrebirth/af/undoredo/service/UndoRedoService.java#L71-L86 |
8,422 | JRebirth/JRebirth | org.jrebirth.af/undoredo/src/main/java/org/jrebirth/af/undoredo/service/UndoRedoService.java | UndoRedoService.redo | public void redo() {
// If there is at least one command to redo
if (this.undoneStack.size() > 0) {
// add the last undone command on the command stack
this.commandStack.add(this.undoneStack.get(this.undoneStack.size() - 1));
// remove the command to redo of the undo... | java | public void redo() {
// If there is at least one command to redo
if (this.undoneStack.size() > 0) {
// add the last undone command on the command stack
this.commandStack.add(this.undoneStack.get(this.undoneStack.size() - 1));
// remove the command to redo of the undo... | [
"public",
"void",
"redo",
"(",
")",
"{",
"// If there is at least one command to redo",
"if",
"(",
"this",
".",
"undoneStack",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"// add the last undone command on the command stack",
"this",
".",
"commandStack",
".",
"add",
... | Redo the last command that was undo-ed. | [
"Redo",
"the",
"last",
"command",
"that",
"was",
"undo",
"-",
"ed",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/undoredo/src/main/java/org/jrebirth/af/undoredo/service/UndoRedoService.java#L91-L106 |
8,423 | inloop/easygcm | easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java | EasyGcm.removeRegistrationId | public static void removeRegistrationId(Context context) {
final SharedPreferences prefs = getGcmPreferences(context);
prefs.edit()
.remove(PROPERTY_REG_ID)
.remove(PROPERTY_APP_VERSION)
.apply();
} | java | public static void removeRegistrationId(Context context) {
final SharedPreferences prefs = getGcmPreferences(context);
prefs.edit()
.remove(PROPERTY_REG_ID)
.remove(PROPERTY_APP_VERSION)
.apply();
} | [
"public",
"static",
"void",
"removeRegistrationId",
"(",
"Context",
"context",
")",
"{",
"final",
"SharedPreferences",
"prefs",
"=",
"getGcmPreferences",
"(",
"context",
")",
";",
"prefs",
".",
"edit",
"(",
")",
".",
"remove",
"(",
"PROPERTY_REG_ID",
")",
".",... | Removes the current registration id effectively forcing the app to register again.
@param context application's context. | [
"Removes",
"the",
"current",
"registration",
"id",
"effectively",
"forcing",
"the",
"app",
"to",
"register",
"again",
"."
] | d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6 | https://github.com/inloop/easygcm/blob/d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6/easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java#L131-L137 |
8,424 | inloop/easygcm | easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java | EasyGcm.onCreate | private void onCreate(Context context) {
// The check method fails if: no network connection / app already registered / GooglePlayServices unavailable
if (GcmUtils.checkCanAndShouldRegister(context)) {
// Start a background service to register in a background thread
context.start... | java | private void onCreate(Context context) {
// The check method fails if: no network connection / app already registered / GooglePlayServices unavailable
if (GcmUtils.checkCanAndShouldRegister(context)) {
// Start a background service to register in a background thread
context.start... | [
"private",
"void",
"onCreate",
"(",
"Context",
"context",
")",
"{",
"// The check method fails if: no network connection / app already registered / GooglePlayServices unavailable",
"if",
"(",
"GcmUtils",
".",
"checkCanAndShouldRegister",
"(",
"context",
")",
")",
"{",
"// Start... | Registers the application defined by a context activity to GCM in case the registration
has not been done already. The method can be called anytime, but typically at app startup. The
registration itself is guaranteed to only run once.
@param context Activity belonging to the app being registered | [
"Registers",
"the",
"application",
"defined",
"by",
"a",
"context",
"activity",
"to",
"GCM",
"in",
"case",
"the",
"registration",
"has",
"not",
"been",
"done",
"already",
".",
"The",
"method",
"can",
"be",
"called",
"anytime",
"but",
"typically",
"at",
"app"... | d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6 | https://github.com/inloop/easygcm/blob/d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6/easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java#L174-L180 |
8,425 | inloop/easygcm | easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java | EasyGcm.onSuccessfulRegistration | void onSuccessfulRegistration(Context context, String regId) {
// You should send the registration ID to your server over HTTP, so it
// can use GCM/HTTP or CCS to send messages to your app.
getGcmListener(context).sendRegistrationIdToBackend(regId);
// Persist the regID - no need to r... | java | void onSuccessfulRegistration(Context context, String regId) {
// You should send the registration ID to your server over HTTP, so it
// can use GCM/HTTP or CCS to send messages to your app.
getGcmListener(context).sendRegistrationIdToBackend(regId);
// Persist the regID - no need to r... | [
"void",
"onSuccessfulRegistration",
"(",
"Context",
"context",
",",
"String",
"regId",
")",
"{",
"// You should send the registration ID to your server over HTTP, so it",
"// can use GCM/HTTP or CCS to send messages to your app.",
"getGcmListener",
"(",
"context",
")",
".",
"sendRe... | Called from an IntentService background thread | [
"Called",
"from",
"an",
"IntentService",
"background",
"thread"
] | d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6 | https://github.com/inloop/easygcm/blob/d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6/easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java#L214-L223 |
8,426 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/module/AbstractModuleStarter.java | AbstractModuleStarter.define | protected void define(final Class<? extends Component<?>> interfaceClass, final boolean exclusive, final boolean reverse) {
preloadClass(interfaceClass);
getFacade().componentFactory().define(
RegistrationPointItemBase.create()
... | java | protected void define(final Class<? extends Component<?>> interfaceClass, final boolean exclusive, final boolean reverse) {
preloadClass(interfaceClass);
getFacade().componentFactory().define(
RegistrationPointItemBase.create()
... | [
"protected",
"void",
"define",
"(",
"final",
"Class",
"<",
"?",
"extends",
"Component",
"<",
"?",
">",
">",
"interfaceClass",
",",
"final",
"boolean",
"exclusive",
",",
"final",
"boolean",
"reverse",
")",
"{",
"preloadClass",
"(",
"interfaceClass",
")",
";",... | Define a new component interface definition.
@param interfaceClass the interface class implemented
@param exclusive the exclusive flag
@param reverse the reverse flag | [
"Define",
"a",
"new",
"component",
"interface",
"definition",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/module/AbstractModuleStarter.java#L49-L58 |
8,427 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/module/AbstractModuleStarter.java | AbstractModuleStarter.bootComponent | @SuppressWarnings("unchecked")
protected void bootComponent(final Class<? extends Component<?>> componentClass) {
preloadClass(componentClass);
try {
if (Command.class.isAssignableFrom(componentClass)) {
getFacade().commandFacade().retrieve((Class<Command>) componentCla... | java | @SuppressWarnings("unchecked")
protected void bootComponent(final Class<? extends Component<?>> componentClass) {
preloadClass(componentClass);
try {
if (Command.class.isAssignableFrom(componentClass)) {
getFacade().commandFacade().retrieve((Class<Command>) componentCla... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"void",
"bootComponent",
"(",
"final",
"Class",
"<",
"?",
"extends",
"Component",
"<",
"?",
">",
">",
"componentClass",
")",
"{",
"preloadClass",
"(",
"componentClass",
")",
";",
"try",
"{",
"i... | Boot component by retrieving it from its facade.
@param componentClass the component class to boot | [
"Boot",
"component",
"by",
"retrieving",
"it",
"from",
"its",
"facade",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/module/AbstractModuleStarter.java#L106-L122 |
8,428 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/module/AbstractModuleStarter.java | AbstractModuleStarter.preloadClass | protected void preloadClass(final Class<?> objectClass) {
try {
Class.forName(objectClass.getName());
} catch (final ClassNotFoundException e) {
LOGGER.error(CLASS_NOT_FOUND, e, objectClass.getName());
}
} | java | protected void preloadClass(final Class<?> objectClass) {
try {
Class.forName(objectClass.getName());
} catch (final ClassNotFoundException e) {
LOGGER.error(CLASS_NOT_FOUND, e, objectClass.getName());
}
} | [
"protected",
"void",
"preloadClass",
"(",
"final",
"Class",
"<",
"?",
">",
"objectClass",
")",
"{",
"try",
"{",
"Class",
".",
"forName",
"(",
"objectClass",
".",
"getName",
"(",
")",
")",
";",
"}",
"catch",
"(",
"final",
"ClassNotFoundException",
"e",
")... | Preload class, useful to preload field initialized with JRebirth Builder.
@param objectClass the object class to load from classloader | [
"Preload",
"class",
"useful",
"to",
"preload",
"field",
"initialized",
"with",
"JRebirth",
"Builder",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/module/AbstractModuleStarter.java#L129-L135 |
8,429 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Favicon.java | Favicon.init | @Override
public Middleware init(@NotNull final Yoke yoke, @NotNull final String mount) {
try {
super.init(yoke, mount);
if (path == null) {
icon = new Icon(Utils.readResourceToBuffer(getClass(), "favicon.ico"));
} else {
icon = new Icon(fi... | java | @Override
public Middleware init(@NotNull final Yoke yoke, @NotNull final String mount) {
try {
super.init(yoke, mount);
if (path == null) {
icon = new Icon(Utils.readResourceToBuffer(getClass(), "favicon.ico"));
} else {
icon = new Icon(fi... | [
"@",
"Override",
"public",
"Middleware",
"init",
"(",
"@",
"NotNull",
"final",
"Yoke",
"yoke",
",",
"@",
"NotNull",
"final",
"String",
"mount",
")",
"{",
"try",
"{",
"super",
".",
"init",
"(",
"yoke",
",",
"mount",
")",
";",
"if",
"(",
"path",
"==",
... | Loads the icon from the file system once we get a reference to Vert.x
@param yoke
@param mount | [
"Loads",
"the",
"icon",
"from",
"the",
"file",
"system",
"once",
"we",
"get",
"a",
"reference",
"to",
"Vert",
".",
"x"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Favicon.java#L127-L141 |
8,430 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/style/StyleSheetBuilder.java | StyleSheetBuilder.buildUrl | private URL buildUrl(final String styleSheetPath, final boolean skipStylesFolder) {
URL cssResource = null;
final List<String> stylePaths = skipStylesFolder ? Collections.singletonList("") : ResourceParameters.STYLE_FOLDER.get();
for (int i = 0; i < stylePaths.size() && cssResource == n... | java | private URL buildUrl(final String styleSheetPath, final boolean skipStylesFolder) {
URL cssResource = null;
final List<String> stylePaths = skipStylesFolder ? Collections.singletonList("") : ResourceParameters.STYLE_FOLDER.get();
for (int i = 0; i < stylePaths.size() && cssResource == n... | [
"private",
"URL",
"buildUrl",
"(",
"final",
"String",
"styleSheetPath",
",",
"final",
"boolean",
"skipStylesFolder",
")",
"{",
"URL",
"cssResource",
"=",
"null",
";",
"final",
"List",
"<",
"String",
">",
"stylePaths",
"=",
"skipStylesFolder",
"?",
"Collections",... | Get a style sheet URL.
@param styleSheetPath the path of the style sheet, path must be separated by '/'
@param skipStylesFolder skip stylesFolder usage
@return the stylesheet url | [
"Get",
"a",
"style",
"sheet",
"URL",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/style/StyleSheetBuilder.java#L95-L114 |
8,431 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/engine/AbstractEngineSync.java | AbstractEngineSync.lastModified | public long lastModified(final String filename) {
LRUCache.CacheEntry<String, T> cacheEntry = cache.get(filename);
if (cacheEntry == null) {
return -1;
}
return cacheEntry.lastModified;
} | java | public long lastModified(final String filename) {
LRUCache.CacheEntry<String, T> cacheEntry = cache.get(filename);
if (cacheEntry == null) {
return -1;
}
return cacheEntry.lastModified;
} | [
"public",
"long",
"lastModified",
"(",
"final",
"String",
"filename",
")",
"{",
"LRUCache",
".",
"CacheEntry",
"<",
"String",
",",
"T",
">",
"cacheEntry",
"=",
"cache",
".",
"get",
"(",
"filename",
")",
";",
"if",
"(",
"cacheEntry",
"==",
"null",
")",
... | Returns the last modified time for the cache entry
@param filename File to look for | [
"Returns",
"the",
"last",
"modified",
"time",
"for",
"the",
"cache",
"entry"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/engine/AbstractEngineSync.java#L75-L81 |
8,432 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.get | @SuppressWarnings("unchecked")
public <R> R get(@NotNull final String name) {
// do some conversions for JsonObject/JsonArray
Object o = context.get(name);
if (o instanceof Map) {
return (R) new JsonObject((Map) o);
}
if (o instanceof List) {
return (... | java | @SuppressWarnings("unchecked")
public <R> R get(@NotNull final String name) {
// do some conversions for JsonObject/JsonArray
Object o = context.get(name);
if (o instanceof Map) {
return (R) new JsonObject((Map) o);
}
if (o instanceof List) {
return (... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"R",
">",
"R",
"get",
"(",
"@",
"NotNull",
"final",
"String",
"name",
")",
"{",
"// do some conversions for JsonObject/JsonArray",
"Object",
"o",
"=",
"context",
".",
"get",
"(",
"name",
")",
... | Allow getting properties in a generified way.
@param name The key to get
@return {R} The found object | [
"Allow",
"getting",
"properties",
"in",
"a",
"generified",
"way",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L104-L116 |
8,433 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.get | public <R> R get(@NotNull final String name, R defaultValue) {
if (context.containsKey(name)) {
return get(name);
} else {
return defaultValue;
}
} | java | public <R> R get(@NotNull final String name, R defaultValue) {
if (context.containsKey(name)) {
return get(name);
} else {
return defaultValue;
}
} | [
"public",
"<",
"R",
">",
"R",
"get",
"(",
"@",
"NotNull",
"final",
"String",
"name",
",",
"R",
"defaultValue",
")",
"{",
"if",
"(",
"context",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"return",
"get",
"(",
"name",
")",
";",
"}",
"else",
"{... | Allow getting properties in a generified way and return defaultValue if the key does not exist.
@param name The key to get
@param defaultValue value returned when the key does not exist
@return {R} The found object | [
"Allow",
"getting",
"properties",
"in",
"a",
"generified",
"way",
"and",
"return",
"defaultValue",
"if",
"the",
"key",
"does",
"not",
"exist",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L124-L130 |
8,434 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.put | @SuppressWarnings("unchecked")
public <R> R put(@NotNull final String name, R value) {
if (value == null) {
return (R) context.remove(name);
}
return (R) context.put(name, value);
} | java | @SuppressWarnings("unchecked")
public <R> R put(@NotNull final String name, R value) {
if (value == null) {
return (R) context.remove(name);
}
return (R) context.put(name, value);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"R",
">",
"R",
"put",
"(",
"@",
"NotNull",
"final",
"String",
"name",
",",
"R",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"(",
"R",
")",
"context",
".... | Allows putting a value into the context
@param name the key to store
@param value the value to store
@return {R} the previous value or null | [
"Allows",
"putting",
"a",
"value",
"into",
"the",
"context"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L138-L144 |
8,435 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.getCookie | public YokeCookie getCookie(@NotNull final String name) {
if (cookies != null) {
for (YokeCookie c : cookies) {
if (name.equals(c.name())) {
return c;
}
}
}
return null;
} | java | public YokeCookie getCookie(@NotNull final String name) {
if (cookies != null) {
for (YokeCookie c : cookies) {
if (name.equals(c.name())) {
return c;
}
}
}
return null;
} | [
"public",
"YokeCookie",
"getCookie",
"(",
"@",
"NotNull",
"final",
"String",
"name",
")",
"{",
"if",
"(",
"cookies",
"!=",
"null",
")",
"{",
"for",
"(",
"YokeCookie",
"c",
":",
"cookies",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"c",
".",
"... | Allow getting Cookie by name.
@param name The key to get
@return The found object | [
"Allow",
"getting",
"Cookie",
"by",
"name",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L197-L206 |
8,436 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.getAllCookies | public List<YokeCookie> getAllCookies(@NotNull final String name) {
List<YokeCookie> foundCookies = new ArrayList<>();
if (cookies != null) {
for (YokeCookie c : cookies) {
if (name.equals(c.name())) {
foundCookies.add(c);
}
}
... | java | public List<YokeCookie> getAllCookies(@NotNull final String name) {
List<YokeCookie> foundCookies = new ArrayList<>();
if (cookies != null) {
for (YokeCookie c : cookies) {
if (name.equals(c.name())) {
foundCookies.add(c);
}
}
... | [
"public",
"List",
"<",
"YokeCookie",
">",
"getAllCookies",
"(",
"@",
"NotNull",
"final",
"String",
"name",
")",
"{",
"List",
"<",
"YokeCookie",
">",
"foundCookies",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"cookies",
"!=",
"null",
")",
... | Allow getting all Cookie by name.
@param name The key to get
@return The found objects | [
"Allow",
"getting",
"all",
"Cookie",
"by",
"name",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L213-L223 |
8,437 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.contentLength | public long contentLength() {
String contentLengthHeader = headers().get("content-length");
if (contentLengthHeader != null) {
return Long.parseLong(contentLengthHeader);
} else {
return -1;
}
} | java | public long contentLength() {
String contentLengthHeader = headers().get("content-length");
if (contentLengthHeader != null) {
return Long.parseLong(contentLengthHeader);
} else {
return -1;
}
} | [
"public",
"long",
"contentLength",
"(",
")",
"{",
"String",
"contentLengthHeader",
"=",
"headers",
"(",
")",
".",
"get",
"(",
"\"content-length\"",
")",
";",
"if",
"(",
"contentLengthHeader",
"!=",
"null",
")",
"{",
"return",
"Long",
".",
"parseLong",
"(",
... | Returns the content length of this request setBody or -1 if header is not present. | [
"Returns",
"the",
"content",
"length",
"of",
"this",
"request",
"setBody",
"or",
"-",
"1",
"if",
"header",
"is",
"not",
"present",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L259-L266 |
8,438 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.body | @SuppressWarnings("unchecked")
public <V> V body() {
if (body != null) {
if (body instanceof Map) {
return (V) new JsonObject((Map) body);
}
if (body instanceof List) {
return (V) new JsonArray((List) body);
}
}
... | java | @SuppressWarnings("unchecked")
public <V> V body() {
if (body != null) {
if (body instanceof Map) {
return (V) new JsonObject((Map) body);
}
if (body instanceof List) {
return (V) new JsonArray((List) body);
}
}
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"V",
">",
"V",
"body",
"(",
")",
"{",
"if",
"(",
"body",
"!=",
"null",
")",
"{",
"if",
"(",
"body",
"instanceof",
"Map",
")",
"{",
"return",
"(",
"V",
")",
"new",
"JsonObject",
"(",... | The request body and eventually a parsed version of it in json or map | [
"The",
"request",
"body",
"and",
"eventually",
"a",
"parsed",
"version",
"of",
"it",
"in",
"json",
"or",
"map"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L269-L281 |
8,439 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.getFile | public YokeFileUpload getFile(@NotNull final String name) {
if (files == null) {
return null;
}
return files.get(name);
} | java | public YokeFileUpload getFile(@NotNull final String name) {
if (files == null) {
return null;
}
return files.get(name);
} | [
"public",
"YokeFileUpload",
"getFile",
"(",
"@",
"NotNull",
"final",
"String",
"name",
")",
"{",
"if",
"(",
"files",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"files",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Get an uploaded file | [
"Get",
"an",
"uploaded",
"file"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L295-L301 |
8,440 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.destroySession | public void destroySession() {
JsonObject session = get("session");
if (session == null) {
return;
}
String sessionId = session.getString("id");
// remove from the context
put("session", null);
if (sessionId == null) {
return;
}
... | java | public void destroySession() {
JsonObject session = get("session");
if (session == null) {
return;
}
String sessionId = session.getString("id");
// remove from the context
put("session", null);
if (sessionId == null) {
return;
}
... | [
"public",
"void",
"destroySession",
"(",
")",
"{",
"JsonObject",
"session",
"=",
"get",
"(",
"\"session\"",
")",
";",
"if",
"(",
"session",
"==",
"null",
")",
"{",
"return",
";",
"}",
"String",
"sessionId",
"=",
"session",
".",
"getString",
"(",
"\"id\""... | Destroys a session from the request context and also from the storage engine. | [
"Destroys",
"a",
"session",
"from",
"the",
"request",
"context",
"and",
"also",
"from",
"the",
"storage",
"engine",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L317-L340 |
8,441 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.loadSession | public void loadSession(final String sessionId, final Handler<Object> handler) {
if (sessionId == null) {
handler.handle(null);
return;
}
store.get(sessionId, new Handler<JsonObject>() {
@Override
public void handle(JsonObject session) {
... | java | public void loadSession(final String sessionId, final Handler<Object> handler) {
if (sessionId == null) {
handler.handle(null);
return;
}
store.get(sessionId, new Handler<JsonObject>() {
@Override
public void handle(JsonObject session) {
... | [
"public",
"void",
"loadSession",
"(",
"final",
"String",
"sessionId",
",",
"final",
"Handler",
"<",
"Object",
">",
"handler",
")",
"{",
"if",
"(",
"sessionId",
"==",
"null",
")",
"{",
"handler",
".",
"handle",
"(",
"null",
")",
";",
"return",
";",
"}",... | Loads a session given its session id and sets the "session" property in the request context.
@param sessionId the id to load
@param handler the success/complete handler | [
"Loads",
"a",
"session",
"given",
"its",
"session",
"id",
"and",
"sets",
"the",
"session",
"property",
"in",
"the",
"request",
"context",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L346-L384 |
8,442 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.createSession | public JsonObject createSession(@NotNull final String sessionId) {
final JsonObject session = new JsonObject().put("id", sessionId);
put("session", session);
response().headersHandler(new Handler<Void>() {
@Override
public void handle(Void event) {
int r... | java | public JsonObject createSession(@NotNull final String sessionId) {
final JsonObject session = new JsonObject().put("id", sessionId);
put("session", session);
response().headersHandler(new Handler<Void>() {
@Override
public void handle(Void event) {
int r... | [
"public",
"JsonObject",
"createSession",
"(",
"@",
"NotNull",
"final",
"String",
"sessionId",
")",
"{",
"final",
"JsonObject",
"session",
"=",
"new",
"JsonObject",
"(",
")",
".",
"put",
"(",
"\"id\"",
",",
"sessionId",
")",
";",
"put",
"(",
"\"session\"",
... | Create a new Session with custom Id and store it with the underlying storage.
Internally create a entry in the request context under the name "session" and add a end handler to save that
object once the execution is terminated. Custom session id could be used with external auth provider like mod-auth-mgr.
@param sessi... | [
"Create",
"a",
"new",
"Session",
"with",
"custom",
"Id",
"and",
"store",
"it",
"with",
"the",
"underlying",
"storage",
".",
"Internally",
"create",
"a",
"entry",
"in",
"the",
"request",
"context",
"under",
"the",
"name",
"session",
"and",
"add",
"a",
"end"... | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L405-L433 |
8,443 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.sortedHeader | public List<String> sortedHeader(@NotNull final String header) {
String accept = getHeader(header);
// accept anything when accept is not present
if (accept == null) {
return Collections.emptyList();
}
// parse
String[] items = accept.split(" *, *");
... | java | public List<String> sortedHeader(@NotNull final String header) {
String accept = getHeader(header);
// accept anything when accept is not present
if (accept == null) {
return Collections.emptyList();
}
// parse
String[] items = accept.split(" *, *");
... | [
"public",
"List",
"<",
"String",
">",
"sortedHeader",
"(",
"@",
"NotNull",
"final",
"String",
"header",
")",
"{",
"String",
"accept",
"=",
"getHeader",
"(",
"header",
")",
";",
"// accept anything when accept is not present",
"if",
"(",
"accept",
"==",
"null",
... | Returns the array of accept-? ordered by quality. | [
"Returns",
"the",
"array",
"of",
"accept",
"-",
"?",
"ordered",
"by",
"quality",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L492-L518 |
8,444 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.getParam | public String getParam(@NotNull final String name, String defaultValue) {
String value = getParam(name);
if (value == null) {
return defaultValue;
}
return value;
} | java | public String getParam(@NotNull final String name, String defaultValue) {
String value = getParam(name);
if (value == null) {
return defaultValue;
}
return value;
} | [
"public",
"String",
"getParam",
"(",
"@",
"NotNull",
"final",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"getParam",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"defaultValue",
";",... | Allow getting parameters in a generified way and return defaultValue if the key does not exist.
@param name The key to get
@param defaultValue value returned when the key does not exist
@return {String} The found object | [
"Allow",
"getting",
"parameters",
"in",
"a",
"generified",
"way",
"and",
"return",
"defaultValue",
"if",
"the",
"key",
"does",
"not",
"exist",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L602-L610 |
8,445 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.getFormAttribute | public String getFormAttribute(@NotNull final String name, String defaultValue) {
String value = request.formAttributes().get(name);
if (value == null) {
return defaultValue;
}
return value;
} | java | public String getFormAttribute(@NotNull final String name, String defaultValue) {
String value = request.formAttributes().get(name);
if (value == null) {
return defaultValue;
}
return value;
} | [
"public",
"String",
"getFormAttribute",
"(",
"@",
"NotNull",
"final",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"request",
".",
"formAttributes",
"(",
")",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"value",
"=... | Allow getting form parameters in a generified way and return defaultValue if the key does not exist.
@param name The key to get
@param defaultValue value returned when the key does not exist
@return {String} The found object | [
"Allow",
"getting",
"form",
"parameters",
"in",
"a",
"generified",
"way",
"and",
"return",
"defaultValue",
"if",
"the",
"key",
"does",
"not",
"exist",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L647-L655 |
8,446 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.getFormParameterList | public List<String> getFormParameterList(@NotNull final String name) {
return request.formAttributes().getAll(name);
} | java | public List<String> getFormParameterList(@NotNull final String name) {
return request.formAttributes().getAll(name);
} | [
"public",
"List",
"<",
"String",
">",
"getFormParameterList",
"(",
"@",
"NotNull",
"final",
"String",
"name",
")",
"{",
"return",
"request",
".",
"formAttributes",
"(",
")",
".",
"getAll",
"(",
"name",
")",
";",
"}"
] | Allow getting form parameters in a generified way.
@param name The key to get
@return {List} The found object | [
"Allow",
"getting",
"form",
"parameters",
"in",
"a",
"generified",
"way",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L662-L664 |
8,447 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java | YokeRequest.locale | public Locale locale() {
String languages = getHeader("Accept-Language");
if (languages != null) {
// parse
String[] acceptLanguages = languages.split(" *, *");
// sort on quality
Arrays.sort(acceptLanguages, ACCEPT_X_COMPARATOR);
String bestL... | java | public Locale locale() {
String languages = getHeader("Accept-Language");
if (languages != null) {
// parse
String[] acceptLanguages = languages.split(" *, *");
// sort on quality
Arrays.sort(acceptLanguages, ACCEPT_X_COMPARATOR);
String bestL... | [
"public",
"Locale",
"locale",
"(",
")",
"{",
"String",
"languages",
"=",
"getHeader",
"(",
"\"Accept-Language\"",
")",
";",
"if",
"(",
"languages",
"!=",
"null",
")",
"{",
"// parse",
"String",
"[",
"]",
"acceptLanguages",
"=",
"languages",
".",
"split",
"... | Read the default locale for this request
@return Locale (best match if more than one) | [
"Read",
"the",
"default",
"locale",
"for",
"this",
"request"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeRequest.java#L675-L700 |
8,448 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java | FXMLUtils.loadFXML | public static <M extends Model> FXMLComponentBase loadFXML(final M model, final String fxmlPath) {
return loadFXML(model, fxmlPath, null);
} | java | public static <M extends Model> FXMLComponentBase loadFXML(final M model, final String fxmlPath) {
return loadFXML(model, fxmlPath, null);
} | [
"public",
"static",
"<",
"M",
"extends",
"Model",
">",
"FXMLComponentBase",
"loadFXML",
"(",
"final",
"M",
"model",
",",
"final",
"String",
"fxmlPath",
")",
"{",
"return",
"loadFXML",
"(",
"model",
",",
"fxmlPath",
",",
"null",
")",
";",
"}"
] | Load a FXML component without resource bundle.
The fxml path could be :
<ul>
<li>Relative : fxml file will be loaded with the classloader of the given model class</li>
<li>Absolute : fxml file will be loaded with default thread class loader, packages must be separated by / character</li>
</ul>
@param model the model ... | [
"Load",
"a",
"FXML",
"component",
"without",
"resource",
"bundle",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java#L72-L74 |
8,449 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java | FXMLUtils.loadFXML | @SuppressWarnings("unchecked")
public static <M extends Model> FXMLComponentBase loadFXML(final M model, final String fxmlPath, final String bundlePath) {
final FXMLLoader fxmlLoader = new FXMLLoader();
final Callback<Class<?>, Object> fxmlControllerFactory = (Callback<Class<?>, Object>) Para... | java | @SuppressWarnings("unchecked")
public static <M extends Model> FXMLComponentBase loadFXML(final M model, final String fxmlPath, final String bundlePath) {
final FXMLLoader fxmlLoader = new FXMLLoader();
final Callback<Class<?>, Object> fxmlControllerFactory = (Callback<Class<?>, Object>) Para... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"M",
"extends",
"Model",
">",
"FXMLComponentBase",
"loadFXML",
"(",
"final",
"M",
"model",
",",
"final",
"String",
"fxmlPath",
",",
"final",
"String",
"bundlePath",
")",
"{",
"final",... | Load a FXML component.
The fxml path could be :
<ul>
<li>Relative : fxml file will be loaded with the classloader of the given model class</li>
<li>Absolute : fxml file will be loaded with default thread class loader, packages must be separated by / character</li>
</ul>
@param model the model that will manage the fxm... | [
"Load",
"a",
"FXML",
"component",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java#L93-L144 |
8,450 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java | FXMLUtils.convertFxmlUrl | private static <M extends Model> URL convertFxmlUrl(final M model, final String fxmlPath) {
URL fxmlUrl = null;
// Replace all '.' separator by path separator '/'
if (model != null) {
// Try to load the resource from the same path as the model class
fxmlUrl = model.g... | java | private static <M extends Model> URL convertFxmlUrl(final M model, final String fxmlPath) {
URL fxmlUrl = null;
// Replace all '.' separator by path separator '/'
if (model != null) {
// Try to load the resource from the same path as the model class
fxmlUrl = model.g... | [
"private",
"static",
"<",
"M",
"extends",
"Model",
">",
"URL",
"convertFxmlUrl",
"(",
"final",
"M",
"model",
",",
"final",
"String",
"fxmlPath",
")",
"{",
"URL",
"fxmlUrl",
"=",
"null",
";",
"// Replace all '.' separator by path separator '/'\r",
"if",
"(",
"mod... | Convert The url of fxml files to allow local and path loading.
@param model the model class that will be used for relative loading
@param fxmlPath the path of the fxml file (relative or absolute)
@return the FXML file URL
@param <M> the model type that will manage this fxml node | [
"Convert",
"The",
"url",
"of",
"fxml",
"files",
"to",
"allow",
"local",
"and",
"path",
"loading",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java#L156-L169 |
8,451 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/SyncRunnable.java | SyncRunnable.waitEnd | public void waitEnd(final long... timeout) {
long start = System.currentTimeMillis();
if (timeout.length == 1) {
start += timeout[0];
} else {
start += DEFAULT_TIME_OUT;
}
while (!this.hasRun.get()) {
try {
Thread.sleep(SLEEP_... | java | public void waitEnd(final long... timeout) {
long start = System.currentTimeMillis();
if (timeout.length == 1) {
start += timeout[0];
} else {
start += DEFAULT_TIME_OUT;
}
while (!this.hasRun.get()) {
try {
Thread.sleep(SLEEP_... | [
"public",
"void",
"waitEnd",
"(",
"final",
"long",
"...",
"timeout",
")",
"{",
"long",
"start",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"timeout",
".",
"length",
"==",
"1",
")",
"{",
"start",
"+=",
"timeout",
"[",
"0",
"]",... | Wait the end of the runnable.
@param timeout the maximum to wait to avoid to freeze the thread | [
"Wait",
"the",
"end",
"of",
"the",
"runnable",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/SyncRunnable.java#L65-L85 |
8,452 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/ErrorHandler.java | ErrorHandler.getMessage | private String getMessage(Object error) {
if (error instanceof Throwable) {
String message = ((Throwable) error).getMessage();
if (message == null) {
if (fullStack) {
message = error.getClass().getName();
}
}
r... | java | private String getMessage(Object error) {
if (error instanceof Throwable) {
String message = ((Throwable) error).getMessage();
if (message == null) {
if (fullStack) {
message = error.getClass().getName();
}
}
r... | [
"private",
"String",
"getMessage",
"(",
"Object",
"error",
")",
"{",
"if",
"(",
"error",
"instanceof",
"Throwable",
")",
"{",
"String",
"message",
"=",
"(",
"(",
"Throwable",
")",
"error",
")",
".",
"getMessage",
"(",
")",
";",
"if",
"(",
"message",
"=... | Extracts a single message from a error Object. This will handle Throwables, Strings and Numbers. In case of
numbers these are handled as Http error codes.
@param error Error object
@return String representation of the error object. | [
"Extracts",
"a",
"single",
"message",
"from",
"a",
"error",
"Object",
".",
"This",
"will",
"handle",
"Throwables",
"Strings",
"and",
"Numbers",
".",
"In",
"case",
"of",
"numbers",
"these",
"are",
"handled",
"as",
"Http",
"error",
"codes",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/ErrorHandler.java#L70-L92 |
8,453 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/ErrorHandler.java | ErrorHandler.getErrorCode | private int getErrorCode(Object error) {
if (error instanceof Number) {
return ((Number) error).intValue();
} else if (error instanceof YokeException) {
return ((YokeException) error).getErrorCode().intValue();
} else if (error instanceof JsonObject) {
return ... | java | private int getErrorCode(Object error) {
if (error instanceof Number) {
return ((Number) error).intValue();
} else if (error instanceof YokeException) {
return ((YokeException) error).getErrorCode().intValue();
} else if (error instanceof JsonObject) {
return ... | [
"private",
"int",
"getErrorCode",
"(",
"Object",
"error",
")",
"{",
"if",
"(",
"error",
"instanceof",
"Number",
")",
"{",
"return",
"(",
"(",
"Number",
")",
"error",
")",
".",
"intValue",
"(",
")",
";",
"}",
"else",
"if",
"(",
"error",
"instanceof",
... | Extracts a single error code from a error Object. This will handle Throwables, Strings and Numbers.
@param error Error object
@return HTTP status code for the error object | [
"Extracts",
"a",
"single",
"error",
"code",
"from",
"a",
"error",
"Object",
".",
"This",
"will",
"handle",
"Throwables",
"Strings",
"and",
"Numbers",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/ErrorHandler.java#L100-L113 |
8,454 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/ErrorHandler.java | ErrorHandler.getStackTrace | private List<String> getStackTrace(Object error) {
if (fullStack && error instanceof Throwable) {
List<String> stackTrace = new ArrayList<>();
for (StackTraceElement t : ((Throwable) error).getStackTrace()) {
stackTrace.add(t.toString());
}
return ... | java | private List<String> getStackTrace(Object error) {
if (fullStack && error instanceof Throwable) {
List<String> stackTrace = new ArrayList<>();
for (StackTraceElement t : ((Throwable) error).getStackTrace()) {
stackTrace.add(t.toString());
}
return ... | [
"private",
"List",
"<",
"String",
">",
"getStackTrace",
"(",
"Object",
"error",
")",
"{",
"if",
"(",
"fullStack",
"&&",
"error",
"instanceof",
"Throwable",
")",
"{",
"List",
"<",
"String",
">",
"stackTrace",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
... | Convert the stack trace to a List in order to be rendered in the error template.
@param error error object
@return List containing the stack trace for the object | [
"Convert",
"the",
"stack",
"trace",
"to",
"a",
"List",
"in",
"order",
"to",
"be",
"rendered",
"in",
"the",
"error",
"template",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/ErrorHandler.java#L121-L131 |
8,455 | JRebirth/JRebirth | org.jrebirth.af/showcase/data/src/main/java/org/jrebirth/af/showcase/data/ui/listing/CheckerController.java | CheckerController.onMouseClicked | void onMouseClicked(final MouseEvent event) {
LOGGER.debug("Start button clicked => Call Comparison Service");
// Clear out the table view
model().object().pLastResult().clear();
// Call service to populate it again
model().returnData(ComparatorService.class,
... | java | void onMouseClicked(final MouseEvent event) {
LOGGER.debug("Start button clicked => Call Comparison Service");
// Clear out the table view
model().object().pLastResult().clear();
// Call service to populate it again
model().returnData(ComparatorService.class,
... | [
"void",
"onMouseClicked",
"(",
"final",
"MouseEvent",
"event",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Start button clicked => Call Comparison Service\"",
")",
";",
"// Clear out the table view",
"model",
"(",
")",
".",
"object",
"(",
")",
".",
"pLastResult",
"(",... | Manage Mouse click of widget that have annotation.
@param event the mouse event | [
"Manage",
"Mouse",
"click",
"of",
"widget",
"that",
"have",
"annotation",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/data/src/main/java/org/jrebirth/af/showcase/data/ui/listing/CheckerController.java#L63-L79 |
8,456 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/log/LogbackAdapter.java | LogbackAdapter.convertLevel | private int convertLevel(final JRLevel level) {
int logbackLevel = 0;
switch (level) {
case Trace:
logbackLevel = LocationAwareLogger.TRACE_INT;
break;
case Debug:
logbackLevel = LocationAwareLogger.DEBUG_INT;
... | java | private int convertLevel(final JRLevel level) {
int logbackLevel = 0;
switch (level) {
case Trace:
logbackLevel = LocationAwareLogger.TRACE_INT;
break;
case Debug:
logbackLevel = LocationAwareLogger.DEBUG_INT;
... | [
"private",
"int",
"convertLevel",
"(",
"final",
"JRLevel",
"level",
")",
"{",
"int",
"logbackLevel",
"=",
"0",
";",
"switch",
"(",
"level",
")",
"{",
"case",
"Trace",
":",
"logbackLevel",
"=",
"LocationAwareLogger",
".",
"TRACE_INT",
";",
"break",
";",
"ca... | Convert JRebirth LogLevel to Logback one.
@param level the JRebirth log level to convert
@return the logback log level | [
"Convert",
"JRebirth",
"LogLevel",
"to",
"Logback",
"one",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/log/LogbackAdapter.java#L62-L84 |
8,457 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java | ServiceTaskBase.getServiceHandlerName | @Override
public String getServiceHandlerName() {
final StringBuilder sb = new StringBuilder();
sb.append(this.service.getClass().getSimpleName()).append(".");
sb.append(this.method.getName()).append("(");
for (final Class<?> parameterType : this.method.getParameterTypes()) {
... | java | @Override
public String getServiceHandlerName() {
final StringBuilder sb = new StringBuilder();
sb.append(this.service.getClass().getSimpleName()).append(".");
sb.append(this.method.getName()).append("(");
for (final Class<?> parameterType : this.method.getParameterTypes()) {
... | [
"@",
"Override",
"public",
"String",
"getServiceHandlerName",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"this",
".",
"service",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",... | Return the full service handler name.
<ServiceName>.<method> ( <parameter type1>, <parameter type2>...., <parameter typeN> )
@return the full service handler name | [
"Return",
"the",
"full",
"service",
"handler",
"name",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java#L124-L134 |
8,458 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java | ServiceTaskBase.handleException | private void handleException(final Throwable e) {
if (e instanceof ServiceException) {
final ServiceException se = (ServiceException) e;
// Only log with warn level to let the application continue its workflow even in developer mode
LOGGER.log(SERVICE_TASK_EXCEPTION, se, se.... | java | private void handleException(final Throwable e) {
if (e instanceof ServiceException) {
final ServiceException se = (ServiceException) e;
// Only log with warn level to let the application continue its workflow even in developer mode
LOGGER.log(SERVICE_TASK_EXCEPTION, se, se.... | [
"private",
"void",
"handleException",
"(",
"final",
"Throwable",
"e",
")",
"{",
"if",
"(",
"e",
"instanceof",
"ServiceException",
")",
"{",
"final",
"ServiceException",
"se",
"=",
"(",
"ServiceException",
")",
"e",
";",
"// Only log with warn level to let the applic... | Handle all exception occurred while doing the task.
@param e the exception to handle | [
"Handle",
"all",
"exception",
"occurred",
"while",
"doing",
"the",
"task",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java#L196-L228 |
8,459 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java | ServiceTaskBase.sendReturnWave | @SuppressWarnings("unchecked")
private void sendReturnWave(final T res) throws CoreException {
Wave returnWave = null;
// Try to retrieve the return Wave type, could be null
final WaveType responseWaveType = this.wave.waveType().returnWaveType();
final Class<? extends Command> res... | java | @SuppressWarnings("unchecked")
private void sendReturnWave(final T res) throws CoreException {
Wave returnWave = null;
// Try to retrieve the return Wave type, could be null
final WaveType responseWaveType = this.wave.waveType().returnWaveType();
final Class<? extends Command> res... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"sendReturnWave",
"(",
"final",
"T",
"res",
")",
"throws",
"CoreException",
"{",
"Wave",
"returnWave",
"=",
"null",
";",
"// Try to retrieve the return Wave type, could be null",
"final",
"WaveType",... | Send a wave that will carry the service result.
2 Kinds of wave can be sent according to service configuration
@param res the service result
@throws CoreException if the wave generation has failed | [
"Send",
"a",
"wave",
"that",
"will",
"carry",
"the",
"service",
"result",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java#L239-L297 |
8,460 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java | ServiceTaskBase.checkProgressRatio | @Override
public boolean checkProgressRatio(final double newWorkDone, final double totalWork, final double amountThreshold) {
double currentRatio;
synchronized (this) {
// Compute the actual progression
currentRatio = this.localWorkDone >= 0 ? 100 * this.localWorkDone / tota... | java | @Override
public boolean checkProgressRatio(final double newWorkDone, final double totalWork, final double amountThreshold) {
double currentRatio;
synchronized (this) {
// Compute the actual progression
currentRatio = this.localWorkDone >= 0 ? 100 * this.localWorkDone / tota... | [
"@",
"Override",
"public",
"boolean",
"checkProgressRatio",
"(",
"final",
"double",
"newWorkDone",
",",
"final",
"double",
"totalWork",
",",
"final",
"double",
"amountThreshold",
")",
"{",
"double",
"currentRatio",
";",
"synchronized",
"(",
"this",
")",
"{",
"//... | Check if the task has enough progressed according to the given threshold.
This method can be called outside the JAT, it's useful to filter useless call to JAT
@param newWorkDone the amount of work done
@param totalWork the total amount of work
@param amountThreshold the minimum threshold amount to return true; range ... | [
"Check",
"if",
"the",
"task",
"has",
"enough",
"progressed",
"according",
"to",
"the",
"given",
"threshold",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java#L367-L381 |
8,461 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeResponse.java | YokeResponse.getHeader | @SuppressWarnings("unchecked")
public <R> R getHeader(String name) {
return (R) headers().get(name);
} | java | @SuppressWarnings("unchecked")
public <R> R getHeader(String name) {
return (R) headers().get(name);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"R",
">",
"R",
"getHeader",
"(",
"String",
"name",
")",
"{",
"return",
"(",
"R",
")",
"headers",
"(",
")",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Allow getting headers in a generified way.
@param name The key to get
@param <R> The type of the return
@return The found object | [
"Allow",
"getting",
"headers",
"in",
"a",
"generified",
"way",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/YokeResponse.java#L141-L144 |
8,462 | amigold/FunDapter | library/src/com/ami/fundapter/FunDapter.java | FunDapter.initFilter | public void initFilter(FunDapterFilter<T> filter) {
if (filter == null)
throw new IllegalArgumentException("Cannot pass a null filter to FunDapter");
this.funDapterFilter = filter;
mFilter = new Filter() {
@Override
protected void publishResults(CharSequen... | java | public void initFilter(FunDapterFilter<T> filter) {
if (filter == null)
throw new IllegalArgumentException("Cannot pass a null filter to FunDapter");
this.funDapterFilter = filter;
mFilter = new Filter() {
@Override
protected void publishResults(CharSequen... | [
"public",
"void",
"initFilter",
"(",
"FunDapterFilter",
"<",
"T",
">",
"filter",
")",
"{",
"if",
"(",
"filter",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Cannot pass a null filter to FunDapter\"",
")",
";",
"this",
".",
"funDapterFilte... | Use this method to enable filtering in the adapter.
@param filter - a filter implementation for your adapter. | [
"Use",
"this",
"method",
"to",
"enable",
"filtering",
"in",
"the",
"adapter",
"."
] | fb33241f265901d73276608689077d4310278eaf | https://github.com/amigold/FunDapter/blob/fb33241f265901d73276608689077d4310278eaf/library/src/com/ami/fundapter/FunDapter.java#L182-L228 |
8,463 | JRebirth/JRebirth | org.jrebirth.af/component/src/main/java/org/jrebirth/af/component/ui/tab/TabbedPaneModel.java | TabbedPaneModel.doInsertTab | public void doInsertTab(int idx, final Dockable tab, final Wave wave) {
// final TabBB<M> t = TabBB.create()
// //.name(model.modelName())
// .modelKey(model.getKey());
// Tab t = model.getBehaviorBean(TabBehavior.class);
if (idx < 0) {
idx = object().tabs().isEmpty... | java | public void doInsertTab(int idx, final Dockable tab, final Wave wave) {
// final TabBB<M> t = TabBB.create()
// //.name(model.modelName())
// .modelKey(model.getKey());
// Tab t = model.getBehaviorBean(TabBehavior.class);
if (idx < 0) {
idx = object().tabs().isEmpty... | [
"public",
"void",
"doInsertTab",
"(",
"int",
"idx",
",",
"final",
"Dockable",
"tab",
",",
"final",
"Wave",
"wave",
")",
"{",
"// final TabBB<M> t = TabBB.create()",
"// //.name(model.modelName())",
"// .modelKey(model.getKey());",
"// Tab t = model.getBehaviorBean(TabBehavior.c... | Insert tab.
@param idx the idx
@param tab the tab
@param wave the wave | [
"Insert",
"tab",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/component/src/main/java/org/jrebirth/af/component/ui/tab/TabbedPaneModel.java#L180-L194 |
8,464 | JRebirth/JRebirth | org.jrebirth.af/preloader/src/main/java/org/jrebirth/af/preloader/AbstractJRebirthPreloader.java | AbstractJRebirthPreloader.getMessageFromCode | private String getMessageFromCode(final int messageCode) {
String res = "";
switch (messageCode) {
case 100:
res = "Initializing";
break;
case 200:
res = "";// Provisioned for custom pre-init task
break;
... | java | private String getMessageFromCode(final int messageCode) {
String res = "";
switch (messageCode) {
case 100:
res = "Initializing";
break;
case 200:
res = "";// Provisioned for custom pre-init task
break;
... | [
"private",
"String",
"getMessageFromCode",
"(",
"final",
"int",
"messageCode",
")",
"{",
"String",
"res",
"=",
"\"\"",
";",
"switch",
"(",
"messageCode",
")",
"{",
"case",
"100",
":",
"res",
"=",
"\"Initializing\"",
";",
"break",
";",
"case",
"200",
":",
... | Gets the message from code.
@param messageCode the message code
@return the message from code | [
"Gets",
"the",
"message",
"from",
"code",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/preloader/src/main/java/org/jrebirth/af/preloader/AbstractJRebirthPreloader.java#L48-L84 |
8,465 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/log/AbstractLogAdapter.java | AbstractLogAdapter.throwError | protected void throwError(final MessageItem messageItem, final Throwable t, final Object... parameters) {
if (messageItem.getLevel() == JRLevel.Exception ||
messageItem.getLevel() == JRLevel.Error && CoreParameters.DEVELOPER_MODE.get()) {
throw new CoreRuntimeException(messageItem... | java | protected void throwError(final MessageItem messageItem, final Throwable t, final Object... parameters) {
if (messageItem.getLevel() == JRLevel.Exception ||
messageItem.getLevel() == JRLevel.Error && CoreParameters.DEVELOPER_MODE.get()) {
throw new CoreRuntimeException(messageItem... | [
"protected",
"void",
"throwError",
"(",
"final",
"MessageItem",
"messageItem",
",",
"final",
"Throwable",
"t",
",",
"final",
"Object",
"...",
"parameters",
")",
"{",
"if",
"(",
"messageItem",
".",
"getLevel",
"(",
")",
"==",
"JRLevel",
".",
"Exception",
"||"... | If an error is logged when running in Developer Mode, Throw a Runtime Exception.
When an exception is logged and when an error is logged and we are running in Developer Mode
@param messageItem the message to display for the exception thrown
@param t the throwable source (could be null)
@param parameters the message p... | [
"If",
"an",
"error",
"is",
"logged",
"when",
"running",
"in",
"Developer",
"Mode",
"Throw",
"a",
"Runtime",
"Exception",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/log/AbstractLogAdapter.java#L46-L51 |
8,466 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java | AbstractBaseCommand.innerRun | final void innerRun(final Wave wave) throws CommandException {
beforePerform(wave);
perform(wave);
afterPerform(wave);
} | java | final void innerRun(final Wave wave) throws CommandException {
beforePerform(wave);
perform(wave);
afterPerform(wave);
} | [
"final",
"void",
"innerRun",
"(",
"final",
"Wave",
"wave",
")",
"throws",
"CommandException",
"{",
"beforePerform",
"(",
"wave",
")",
";",
"perform",
"(",
"wave",
")",
";",
"afterPerform",
"(",
"wave",
")",
";",
"}"
] | Run the inner task.
@param wave the wave that have triggered this command
@throws CommandException if an error occurred | [
"Run",
"the",
"inner",
"task",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java#L203-L207 |
8,467 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java | AbstractBaseCommand.fireConsumed | protected void fireConsumed(final Wave wave) {
LOGGER.trace(this.getClass().getSimpleName() + " consumes " + wave.toString());
wave.status(Wave.Status.Consumed);
} | java | protected void fireConsumed(final Wave wave) {
LOGGER.trace(this.getClass().getSimpleName() + " consumes " + wave.toString());
wave.status(Wave.Status.Consumed);
} | [
"protected",
"void",
"fireConsumed",
"(",
"final",
"Wave",
"wave",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"this",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
"+",
"\" consumes \"",
"+",
"wave",
".",
"toString",
"(",
")",
")",
";",
"wave... | Fire a consumed event for command listeners.
And consume the wave that trigger this command
@param wave forward the wave that has been performed | [
"Fire",
"a",
"consumed",
"event",
"for",
"command",
"listeners",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java#L283-L286 |
8,468 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java | AbstractBaseCommand.fireHandled | protected void fireHandled(final Wave wave) {
LOGGER.trace(this.getClass().getSimpleName() + " handles " + wave.toString());
wave.status(Wave.Status.Handled);
} | java | protected void fireHandled(final Wave wave) {
LOGGER.trace(this.getClass().getSimpleName() + " handles " + wave.toString());
wave.status(Wave.Status.Handled);
} | [
"protected",
"void",
"fireHandled",
"(",
"final",
"Wave",
"wave",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"this",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
"+",
"\" handles \"",
"+",
"wave",
".",
"toString",
"(",
")",
")",
";",
"wave",... | Fire an handled event for command listeners.
And handle the wave that trigger this command
@param wave forward the wave that has been performed | [
"Fire",
"an",
"handled",
"event",
"for",
"command",
"listeners",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java#L295-L298 |
8,469 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java | AbstractBaseCommand.fireFailed | protected void fireFailed(final Wave wave) {
LOGGER.trace(this.getClass().getSimpleName() + " has failed " + wave.toString());
wave.status(Wave.Status.Failed);
} | java | protected void fireFailed(final Wave wave) {
LOGGER.trace(this.getClass().getSimpleName() + " has failed " + wave.toString());
wave.status(Wave.Status.Failed);
} | [
"protected",
"void",
"fireFailed",
"(",
"final",
"Wave",
"wave",
")",
"{",
"LOGGER",
".",
"trace",
"(",
"this",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
"+",
"\" has failed \"",
"+",
"wave",
".",
"toString",
"(",
")",
")",
";",
"wave... | Fire a failed event for command listeners.
And mark as failed the wave that trigger this command
@param wave forward the wave that has been performed | [
"Fire",
"a",
"failed",
"event",
"for",
"command",
"listeners",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/command/AbstractBaseCommand.java#L307-L310 |
8,470 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java | Static.writeHeaders | private void writeHeaders(final YokeRequest request, final FileProps props) {
MultiMap headers = request.response().headers();
if (!headers.contains("etag")) {
headers.set("etag", "\"" + props.size() + "-" + props.lastModifiedTime() + "\"");
}
if (!headers.contains("date")... | java | private void writeHeaders(final YokeRequest request, final FileProps props) {
MultiMap headers = request.response().headers();
if (!headers.contains("etag")) {
headers.set("etag", "\"" + props.size() + "-" + props.lastModifiedTime() + "\"");
}
if (!headers.contains("date")... | [
"private",
"void",
"writeHeaders",
"(",
"final",
"YokeRequest",
"request",
",",
"final",
"FileProps",
"props",
")",
"{",
"MultiMap",
"headers",
"=",
"request",
".",
"response",
"(",
")",
".",
"headers",
"(",
")",
";",
"if",
"(",
"!",
"headers",
".",
"con... | Create all required header so content can be cache by Caching servers or Browsers
@param request
@param props | [
"Create",
"all",
"required",
"header",
"so",
"content",
"can",
"be",
"cache",
"by",
"Caching",
"servers",
"or",
"Browsers"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java#L125-L144 |
8,471 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java | Static.sendFile | private void sendFile(final YokeRequest request, final String file, final FileProps props) {
// write content type
String contentType = MimeType.getMime(file);
String charset = MimeType.getCharset(contentType);
request.response().setContentType(contentType, charset);
request.resp... | java | private void sendFile(final YokeRequest request, final String file, final FileProps props) {
// write content type
String contentType = MimeType.getMime(file);
String charset = MimeType.getCharset(contentType);
request.response().setContentType(contentType, charset);
request.resp... | [
"private",
"void",
"sendFile",
"(",
"final",
"YokeRequest",
"request",
",",
"final",
"String",
"file",
",",
"final",
"FileProps",
"props",
")",
"{",
"// write content type",
"String",
"contentType",
"=",
"MimeType",
".",
"getMime",
"(",
"file",
")",
";",
"Stri... | Write a file into the response body
@param request
@param file
@param props | [
"Write",
"a",
"file",
"into",
"the",
"response",
"body"
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java#L175-L188 |
8,472 | pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java | Static.isFresh | private boolean isFresh(final YokeRequest request) {
// defaults
boolean etagMatches = true;
boolean notModified = true;
// fields
String modifiedSince = request.getHeader("if-modified-since");
String noneMatch = request.getHeader("if-none-match");
String[] noneM... | java | private boolean isFresh(final YokeRequest request) {
// defaults
boolean etagMatches = true;
boolean notModified = true;
// fields
String modifiedSince = request.getHeader("if-modified-since");
String noneMatch = request.getHeader("if-none-match");
String[] noneM... | [
"private",
"boolean",
"isFresh",
"(",
"final",
"YokeRequest",
"request",
")",
"{",
"// defaults",
"boolean",
"etagMatches",
"=",
"true",
";",
"boolean",
"notModified",
"=",
"true",
";",
"// fields",
"String",
"modifiedSince",
"=",
"request",
".",
"getHeader",
"(... | Verify if a resource is fresh, fresh means that its cache headers are validated against the local resource and
etags last-modified headers are still the same.
@param request
@return {boolean} | [
"Verify",
"if",
"a",
"resource",
"is",
"fresh",
"fresh",
"means",
"that",
"its",
"cache",
"headers",
"are",
"validated",
"against",
"the",
"local",
"resource",
"and",
"etags",
"last",
"-",
"modified",
"headers",
"are",
"still",
"the",
"same",
"."
] | fe8a64036f09fb745f0644faddd46162d64faf3c | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java#L304-L349 |
8,473 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/facade/AbstractFacade.java | AbstractFacade.getReadyObjectList | @SuppressWarnings("unchecked")
private <E extends R> List<E> getReadyObjectList(final UniqueKey<E> uniqueKey) {
List<E> readyObjectList = null;
synchronized (this.componentMap) {
// retrieve the component from the singleton map
// It the component is already registered, get ... | java | @SuppressWarnings("unchecked")
private <E extends R> List<E> getReadyObjectList(final UniqueKey<E> uniqueKey) {
List<E> readyObjectList = null;
synchronized (this.componentMap) {
// retrieve the component from the singleton map
// It the component is already registered, get ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"<",
"E",
"extends",
"R",
">",
"List",
"<",
"E",
">",
"getReadyObjectList",
"(",
"final",
"UniqueKey",
"<",
"E",
">",
"uniqueKey",
")",
"{",
"List",
"<",
"E",
">",
"readyObjectList",
"=",
"nu... | Check the presence of the Object and return it if possible otherwise return null.
@param uniqueKey the unqiueKey of thesearch object
@return the readyObject or null | [
"Check",
"the",
"presence",
"of",
"the",
"Object",
"and",
"return",
"it",
"if",
"possible",
"otherwise",
"return",
"null",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/facade/AbstractFacade.java#L267-L287 |
8,474 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/facade/AbstractFacade.java | AbstractFacade.buildComponentList | @SuppressWarnings("unchecked")
protected <E extends R> List<E> buildComponentList(final UniqueKey<E> uniqueKey) throws CoreException {
// Build a new instance of the component
final List<E> readyObjectList = globalFacade().componentFactory().buildComponents(uniqueKey.classField());
for (fi... | java | @SuppressWarnings("unchecked")
protected <E extends R> List<E> buildComponentList(final UniqueKey<E> uniqueKey) throws CoreException {
// Build a new instance of the component
final List<E> readyObjectList = globalFacade().componentFactory().buildComponents(uniqueKey.classField());
for (fi... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"E",
"extends",
"R",
">",
"List",
"<",
"E",
">",
"buildComponentList",
"(",
"final",
"UniqueKey",
"<",
"E",
">",
"uniqueKey",
")",
"throws",
"CoreException",
"{",
"// Build a new instance of t... | Build a new instance of the ready object class.
@param uniqueKey the unique key for the component to get
@return a new instance of the given clazz and key
@param <E> the type of the ready object to retrieve
@throws CoreException if an error occurred | [
"Build",
"a",
"new",
"instance",
"of",
"the",
"ready",
"object",
"class",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/facade/AbstractFacade.java#L300-L342 |
8,475 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThreadPoolExecutor.java | JRebirthThreadPoolExecutor.checkPriority | private boolean checkPriority(final PriorityLevel taskPriority) {
boolean highPriority = false;
synchronized (this.pending) {
for (final JRebirthRunnable jr : this.pending) {
highPriority |= taskPriority.level() > jr.priority().level();
}
}
return... | java | private boolean checkPriority(final PriorityLevel taskPriority) {
boolean highPriority = false;
synchronized (this.pending) {
for (final JRebirthRunnable jr : this.pending) {
highPriority |= taskPriority.level() > jr.priority().level();
}
}
return... | [
"private",
"boolean",
"checkPriority",
"(",
"final",
"PriorityLevel",
"taskPriority",
")",
"{",
"boolean",
"highPriority",
"=",
"false",
";",
"synchronized",
"(",
"this",
".",
"pending",
")",
"{",
"for",
"(",
"final",
"JRebirthRunnable",
"jr",
":",
"this",
"."... | Check given priority with current pending list.
@param taskPriority the priority to check
@return true if the priority is greater than those pending | [
"Check",
"given",
"priority",
"with",
"current",
"pending",
"list",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirthThreadPoolExecutor.java#L85-L94 |
8,476 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractModel.java | AbstractModel.listenObject | protected <T> void listenObject(ObjectProperty<T> objectProperty, Consumer<T> consumeOld, Consumer<T> consumeNew) {
objectProperty.addListener(
(final ObservableValue<? extends T> ov, final T old_val, final T new_val) -> {
if (old_val != ... | java | protected <T> void listenObject(ObjectProperty<T> objectProperty, Consumer<T> consumeOld, Consumer<T> consumeNew) {
objectProperty.addListener(
(final ObservableValue<? extends T> ov, final T old_val, final T new_val) -> {
if (old_val != ... | [
"protected",
"<",
"T",
">",
"void",
"listenObject",
"(",
"ObjectProperty",
"<",
"T",
">",
"objectProperty",
",",
"Consumer",
"<",
"T",
">",
"consumeOld",
",",
"Consumer",
"<",
"T",
">",
"consumeNew",
")",
"{",
"objectProperty",
".",
"addListener",
"(",
"("... | Listen object change.
@param objectProperty the object to listen
@param consumeOld process the old object
@param consumeNew process the new object | [
"Listen",
"object",
"change",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractModel.java#L178-L188 |
8,477 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractModel.java | AbstractModel.buildView | @SuppressWarnings("unchecked")
protected V buildView() throws CoreException {
return (V) ClassUtility.findAndBuildGenericType(this.getClass(), View.class, NullView.class, this);
} | java | @SuppressWarnings("unchecked")
protected V buildView() throws CoreException {
return (V) ClassUtility.findAndBuildGenericType(this.getClass(), View.class, NullView.class, this);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"V",
"buildView",
"(",
")",
"throws",
"CoreException",
"{",
"return",
"(",
"V",
")",
"ClassUtility",
".",
"findAndBuildGenericType",
"(",
"this",
".",
"getClass",
"(",
")",
",",
"View",
".",
"c... | Create the view it was null.
@throws CoreException when han't been built correctly | [
"Create",
"the",
"view",
"it",
"was",
"null",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractModel.java#L213-L217 |
8,478 | JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java | BallView.setStyle | public void setStyle(final JRebirthEventType eventType) {
switch (eventType) {
case CREATE_APPLICATION:
this.circle.setFill(BallColors.APPLICATION.get());
this.label.setText("App");
break;
case CREATE_NOTIFIER:
this.circle.... | java | public void setStyle(final JRebirthEventType eventType) {
switch (eventType) {
case CREATE_APPLICATION:
this.circle.setFill(BallColors.APPLICATION.get());
this.label.setText("App");
break;
case CREATE_NOTIFIER:
this.circle.... | [
"public",
"void",
"setStyle",
"(",
"final",
"JRebirthEventType",
"eventType",
")",
"{",
"switch",
"(",
"eventType",
")",
"{",
"case",
"CREATE_APPLICATION",
":",
"this",
".",
"circle",
".",
"setFill",
"(",
"BallColors",
".",
"APPLICATION",
".",
"get",
"(",
")... | Define the ball style.
@param eventType the type of event for this ball | [
"Define",
"the",
"ball",
"style",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java#L178-L225 |
8,479 | JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java | BallView.resetScale | public void resetScale() {
ScaleTransitionBuilder.create()
.duration(Duration.millis(400))
.node(node())
.toX(1f)
.toY(1f)
.cycleCount(1)
... | java | public void resetScale() {
ScaleTransitionBuilder.create()
.duration(Duration.millis(400))
.node(node())
.toX(1f)
.toY(1f)
.cycleCount(1)
... | [
"public",
"void",
"resetScale",
"(",
")",
"{",
"ScaleTransitionBuilder",
".",
"create",
"(",
")",
".",
"duration",
"(",
"Duration",
".",
"millis",
"(",
"400",
")",
")",
".",
"node",
"(",
"node",
"(",
")",
")",
".",
"toX",
"(",
"1f",
")",
".",
"toY"... | To complete. | [
"To",
"complete",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java#L230-L240 |
8,480 | JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java | BallView.getX | private double getX() {
double res;
switch (model().getEventModel().eventType()) {
case CREATE_APPLICATION:
case CREATE_COMMAND:
case CREATE_COMMAND_FACADE:
res = 0;
break;
case CREATE_GLOBAL_FACADE:
case CREATE_... | java | private double getX() {
double res;
switch (model().getEventModel().eventType()) {
case CREATE_APPLICATION:
case CREATE_COMMAND:
case CREATE_COMMAND_FACADE:
res = 0;
break;
case CREATE_GLOBAL_FACADE:
case CREATE_... | [
"private",
"double",
"getX",
"(",
")",
"{",
"double",
"res",
";",
"switch",
"(",
"model",
"(",
")",
".",
"getEventModel",
"(",
")",
".",
"eventType",
"(",
")",
")",
"{",
"case",
"CREATE_APPLICATION",
":",
"case",
"CREATE_COMMAND",
":",
"case",
"CREATE_CO... | Return the x coordinate.
@return the x value | [
"Return",
"the",
"x",
"coordinate",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java#L299-L324 |
8,481 | JRebirth/JRebirth | org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java | BallView.getY | private double getY() {
double res;
switch (model().getEventModel().eventType()) {
case CREATE_COMMAND_FACADE:
case CREATE_COMMAND:
res = -200 * Math.sin(Math.PI / 2);
break;
case CREATE_GLOBAL_FACADE:
case CREATE_APPLICATIO... | java | private double getY() {
double res;
switch (model().getEventModel().eventType()) {
case CREATE_COMMAND_FACADE:
case CREATE_COMMAND:
res = -200 * Math.sin(Math.PI / 2);
break;
case CREATE_GLOBAL_FACADE:
case CREATE_APPLICATIO... | [
"private",
"double",
"getY",
"(",
")",
"{",
"double",
"res",
";",
"switch",
"(",
"model",
"(",
")",
".",
"getEventModel",
"(",
")",
".",
"eventType",
"(",
")",
")",
"{",
"case",
"CREATE_COMMAND_FACADE",
":",
"case",
"CREATE_COMMAND",
":",
"res",
"=",
"... | Return the y coordinate.
@return the y value | [
"Return",
"the",
"y",
"coordinate",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/editor/ball/BallView.java#L331-L353 |
8,482 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveTypeBase.java | WaveTypeBase.getItems | public String getItems() {
final StringBuilder sb = new StringBuilder();
boolean first = true;
for (final WaveItem<?> waveItem : items()) {
if (first) {
first = false;
} else {
sb.append(", ");
}
String fullName = wa... | java | public String getItems() {
final StringBuilder sb = new StringBuilder();
boolean first = true;
for (final WaveItem<?> waveItem : items()) {
if (first) {
first = false;
} else {
sb.append(", ");
}
String fullName = wa... | [
"public",
"String",
"getItems",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"final",
"WaveItem",
"<",
"?",
">",
"waveItem",
":",
"items",
"(",
")",
")",
... | Return the required method parameter list to handle this WaveType.
@return the parameter list (Type1 arg1, Type2 arg2 ...) | [
"Return",
"the",
"required",
"method",
"parameter",
"list",
"to",
"handle",
"this",
"WaveType",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveTypeBase.java#L241-L262 |
8,483 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java | AbstractBaseController.wrapbuildHandler | private <E extends Event> EventHandler<E> wrapbuildHandler(final EventAdapter eventAdapter, final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass)
throws CoreException {
try {
return handlerClass.getDeclaredConstructor(adapterClass).newInst... | java | private <E extends Event> EventHandler<E> wrapbuildHandler(final EventAdapter eventAdapter, final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass)
throws CoreException {
try {
return handlerClass.getDeclaredConstructor(adapterClass).newInst... | [
"private",
"<",
"E",
"extends",
"Event",
">",
"EventHandler",
"<",
"E",
">",
"wrapbuildHandler",
"(",
"final",
"EventAdapter",
"eventAdapter",
",",
"final",
"Class",
"<",
"?",
"extends",
"EventAdapter",
">",
"adapterClass",
",",
"final",
"Class",
"<",
"?",
"... | Build an event handler by reflection to wrap the event adapter given.
@param eventAdapter the instance of an eventAdapter
@param adapterClass the adapter class used by the handler constructor
@param handlerClass the handler class to build
@return the required event handler
@param <E> the Event type to manage
@throw... | [
"Build",
"an",
"event",
"handler",
"by",
"reflection",
"to",
"wrap",
"the",
"event",
"adapter",
"given",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java#L234-L241 |
8,484 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java | AbstractBaseController.buildEventHandler | private <E extends Event> EventHandler<E> buildEventHandler(final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass) throws CoreException {
EventHandler<E> eventHandler = null;
// Build the mouse handler instance
if (adapterClass.isAssignableFrom(th... | java | private <E extends Event> EventHandler<E> buildEventHandler(final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass) throws CoreException {
EventHandler<E> eventHandler = null;
// Build the mouse handler instance
if (adapterClass.isAssignableFrom(th... | [
"private",
"<",
"E",
"extends",
"Event",
">",
"EventHandler",
"<",
"E",
">",
"buildEventHandler",
"(",
"final",
"Class",
"<",
"?",
"extends",
"EventAdapter",
">",
"adapterClass",
",",
"final",
"Class",
"<",
"?",
"extends",
"EventHandler",
"<",
"E",
">",
">... | Build an event handler by reflection using the Controller object as eventAdapter.
@param adapterClass the event adapter class to used
@param handlerClass the event handler class to used
@return the required event handler
@param <E> the Event type to manage
@throws CoreException if the local api contract is not resp... | [
"Build",
"an",
"event",
"handler",
"by",
"reflection",
"using",
"the",
"Controller",
"object",
"as",
"eventAdapter",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java#L255-L265 |
8,485 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java | AbstractBaseController.isEventType | private boolean isEventType(final EventType<? extends Event> testEventType, final EventType<? extends Event> anyEventType) {
return testEventType.equals(anyEventType) || testEventType.getSuperType().equals(anyEventType);
} | java | private boolean isEventType(final EventType<? extends Event> testEventType, final EventType<? extends Event> anyEventType) {
return testEventType.equals(anyEventType) || testEventType.getSuperType().equals(anyEventType);
} | [
"private",
"boolean",
"isEventType",
"(",
"final",
"EventType",
"<",
"?",
"extends",
"Event",
">",
"testEventType",
",",
"final",
"EventType",
"<",
"?",
"extends",
"Event",
">",
"anyEventType",
")",
"{",
"return",
"testEventType",
".",
"equals",
"(",
"anyEvent... | Check the event type given and check the super level if necessary to always return the ANy event type.
@param testEventType the sub event type or any instance
@param anyEventType the eventype.ANY instance
@return true if the ANY event type is the same for both objects | [
"Check",
"the",
"event",
"type",
"given",
"and",
"check",
"the",
"super",
"level",
"if",
"necessary",
"to",
"always",
"return",
"the",
"ANy",
"event",
"type",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java#L275-L277 |
8,486 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java | WaveBase.waveBeanContains | private boolean waveBeanContains(WaveItem<?> waveItem) {
return waveBeanList().stream()
.flatMap(wb -> Stream.of(wb.getClass().getDeclaredFields()))
.map(f -> f.getName())
.anyMatch(n -> waveItem.name().equals(n));
} | java | private boolean waveBeanContains(WaveItem<?> waveItem) {
return waveBeanList().stream()
.flatMap(wb -> Stream.of(wb.getClass().getDeclaredFields()))
.map(f -> f.getName())
.anyMatch(n -> waveItem.name().equals(n));
} | [
"private",
"boolean",
"waveBeanContains",
"(",
"WaveItem",
"<",
"?",
">",
"waveItem",
")",
"{",
"return",
"waveBeanList",
"(",
")",
".",
"stream",
"(",
")",
".",
"flatMap",
"(",
"wb",
"->",
"Stream",
".",
"of",
"(",
"wb",
".",
"getClass",
"(",
")",
"... | Check if this item is contained into on Wave bean .
@param waveItem the wave item to find
@return true, if successful | [
"Check",
"if",
"this",
"item",
"is",
"contained",
"into",
"on",
"Wave",
"bean",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java#L328-L333 |
8,487 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java | WaveBase.waveBeanGet | private Object waveBeanGet(WaveItem<?> waveItem) {
for (final WaveBean wb : waveBeanList()) {
final Object o = Stream.of(wb.getClass().getDeclaredFields())
.filter(f -> waveItem.name().equals(f.getName()))
.map(f -> ClassUtility.... | java | private Object waveBeanGet(WaveItem<?> waveItem) {
for (final WaveBean wb : waveBeanList()) {
final Object o = Stream.of(wb.getClass().getDeclaredFields())
.filter(f -> waveItem.name().equals(f.getName()))
.map(f -> ClassUtility.... | [
"private",
"Object",
"waveBeanGet",
"(",
"WaveItem",
"<",
"?",
">",
"waveItem",
")",
"{",
"for",
"(",
"final",
"WaveBean",
"wb",
":",
"waveBeanList",
"(",
")",
")",
"{",
"final",
"Object",
"o",
"=",
"Stream",
".",
"of",
"(",
"wb",
".",
"getClass",
"(... | Retrieve the field value from wave bean
@param waveItem the wave item to retrieve
@return the object value | [
"Retrieve",
"the",
"field",
"value",
"from",
"wave",
"bean"
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java#L342-L353 |
8,488 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java | WaveBase.getWaveBeanMap | private Map<Class<? extends WaveBean>, WaveBean> getWaveBeanMap() {
if (this.waveBeanMap == null) {
this.waveBeanMap = new HashMap<>();
}
return this.waveBeanMap;
} | java | private Map<Class<? extends WaveBean>, WaveBean> getWaveBeanMap() {
if (this.waveBeanMap == null) {
this.waveBeanMap = new HashMap<>();
}
return this.waveBeanMap;
} | [
"private",
"Map",
"<",
"Class",
"<",
"?",
"extends",
"WaveBean",
">",
",",
"WaveBean",
">",
"getWaveBeanMap",
"(",
")",
"{",
"if",
"(",
"this",
".",
"waveBeanMap",
"==",
"null",
")",
"{",
"this",
".",
"waveBeanMap",
"=",
"new",
"HashMap",
"<>",
"(",
... | Get the Wave Bean map. Create it if it hasn't been done before.
@return the wave bean map never null | [
"Get",
"the",
"Wave",
"Bean",
"map",
".",
"Create",
"it",
"if",
"it",
"hasn",
"t",
"been",
"done",
"before",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java#L394-L399 |
8,489 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java | WaveBase.fireStatusChanged | private void fireStatusChanged() {
// System.out.println("fireStatusChanged " + this.status.toString());
for (final WaveListener waveListener : this.waveListeners) {
switch (this.statusProperty.get()) {
case Created:
waveListener.waveCreated(this);
... | java | private void fireStatusChanged() {
// System.out.println("fireStatusChanged " + this.status.toString());
for (final WaveListener waveListener : this.waveListeners) {
switch (this.statusProperty.get()) {
case Created:
waveListener.waveCreated(this);
... | [
"private",
"void",
"fireStatusChanged",
"(",
")",
"{",
"// System.out.println(\"fireStatusChanged \" + this.status.toString());",
"for",
"(",
"final",
"WaveListener",
"waveListener",
":",
"this",
".",
"waveListeners",
")",
"{",
"switch",
"(",
"this",
".",
"statusProperty"... | Fire a wave status change. | [
"Fire",
"a",
"wave",
"status",
"change",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveBase.java#L506-L541 |
8,490 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/WaveHandlerBase.java | WaveHandlerBase.retrieveCustomMethod | private Method retrieveCustomMethod(final Wave wave) {
Method customMethod = null;
// Search the wave handler method to call
customMethod = this.defaultMethod == null
// Method computed according to wave prefix and wave type action
// name
? ClassU... | java | private Method retrieveCustomMethod(final Wave wave) {
Method customMethod = null;
// Search the wave handler method to call
customMethod = this.defaultMethod == null
// Method computed according to wave prefix and wave type action
// name
? ClassU... | [
"private",
"Method",
"retrieveCustomMethod",
"(",
"final",
"Wave",
"wave",
")",
"{",
"Method",
"customMethod",
"=",
"null",
";",
"// Search the wave handler method to call",
"customMethod",
"=",
"this",
".",
"defaultMethod",
"==",
"null",
"// Method computed according to ... | Retrieve the custom wave handler method.
@param wave the wave to be handled
@return the custom handler method or null if none exists | [
"Retrieve",
"the",
"custom",
"wave",
"handler",
"method",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/WaveHandlerBase.java#L165-L182 |
8,491 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/WaveHandlerBase.java | WaveHandlerBase.performHandle | private void performHandle(final Wave wave, final Method method) throws WaveException {
// Build parameter list of the searched method
final List<Object> parameterValues = new ArrayList<>();
// Don't add WaveType parameters if we us the default processWave method
if (!AbstractComponent... | java | private void performHandle(final Wave wave, final Method method) throws WaveException {
// Build parameter list of the searched method
final List<Object> parameterValues = new ArrayList<>();
// Don't add WaveType parameters if we us the default processWave method
if (!AbstractComponent... | [
"private",
"void",
"performHandle",
"(",
"final",
"Wave",
"wave",
",",
"final",
"Method",
"method",
")",
"throws",
"WaveException",
"{",
"// Build parameter list of the searched method",
"final",
"List",
"<",
"Object",
">",
"parameterValues",
"=",
"new",
"ArrayList",
... | Perform the handle independently of thread used.
@param wave the wave to manage
@param method the handler method to call, could be null
@throws WaveException if an error occurred while processing the wave | [
"Perform",
"the",
"handle",
"independently",
"of",
"thread",
"used",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/WaveHandlerBase.java#L192-L220 |
8,492 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveTypeRegistry.java | WaveTypeRegistry.getWaveType | public static WaveType getWaveType(final String action) {
WaveType waveType = null;
if (waveTypeMap.containsKey(action)) {
waveType = waveTypeMap.get(action);
}
return waveType;
} | java | public static WaveType getWaveType(final String action) {
WaveType waveType = null;
if (waveTypeMap.containsKey(action)) {
waveType = waveTypeMap.get(action);
}
return waveType;
} | [
"public",
"static",
"WaveType",
"getWaveType",
"(",
"final",
"String",
"action",
")",
"{",
"WaveType",
"waveType",
"=",
"null",
";",
"if",
"(",
"waveTypeMap",
".",
"containsKey",
"(",
"action",
")",
")",
"{",
"waveType",
"=",
"waveTypeMap",
".",
"get",
"("... | Retrieve a WaveType according to its unique action name.
Be careful it could return null if the {@link WaveType} has not been initialized yet.
@param action the unique action name used to register the WaveType
@return the WaveType found into registry or null | [
"Retrieve",
"a",
"WaveType",
"according",
"to",
"its",
"unique",
"action",
"name",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/wave/WaveTypeRegistry.java#L65-L72 |
8,493 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/image/ImageBuilder.java | ImageBuilder.buildWebImage | private Image buildWebImage(final WebImage jrImage) {
final String url = jrImage.getUrl();
Image image = null;
if (url == null || url.isEmpty()) {
LOGGER.error("Image : {} not found !", url);
} else {
image = new Image(url);
}
return im... | java | private Image buildWebImage(final WebImage jrImage) {
final String url = jrImage.getUrl();
Image image = null;
if (url == null || url.isEmpty()) {
LOGGER.error("Image : {} not found !", url);
} else {
image = new Image(url);
}
return im... | [
"private",
"Image",
"buildWebImage",
"(",
"final",
"WebImage",
"jrImage",
")",
"{",
"final",
"String",
"url",
"=",
"jrImage",
".",
"getUrl",
"(",
")",
";",
"Image",
"image",
"=",
"null",
";",
"if",
"(",
"url",
"==",
"null",
"||",
"url",
".",
"isEmpty",... | Build a web image with its url parameters.
@param jrImage the web image params
@return the JavaFX image object | [
"Build",
"a",
"web",
"image",
"with",
"its",
"url",
"parameters",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/image/ImageBuilder.java#L116-L127 |
8,494 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/image/ImageBuilder.java | ImageBuilder.loadImage | private Image loadImage(final String resourceName, final boolean skipImagesFolder) {
Image image = null;
final List<String> imagePaths = skipImagesFolder ? Collections.singletonList("") : ResourceParameters.IMAGE_FOLDER.get();
for (int i = 0; i < imagePaths.size() && image == null; i++) {
... | java | private Image loadImage(final String resourceName, final boolean skipImagesFolder) {
Image image = null;
final List<String> imagePaths = skipImagesFolder ? Collections.singletonList("") : ResourceParameters.IMAGE_FOLDER.get();
for (int i = 0; i < imagePaths.size() && image == null; i++) {
... | [
"private",
"Image",
"loadImage",
"(",
"final",
"String",
"resourceName",
",",
"final",
"boolean",
"skipImagesFolder",
")",
"{",
"Image",
"image",
"=",
"null",
";",
"final",
"List",
"<",
"String",
">",
"imagePaths",
"=",
"skipImagesFolder",
"?",
"Collections",
... | Load an image.
@param resourceName the name of the image, path must be separated by '/'
@param skipImagesFolder skip imagesFolder prefix addition
@return the image loaded | [
"Load",
"an",
"image",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/image/ImageBuilder.java#L138-L157 |
8,495 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java | ClassUtility.buildGenericType | public static Object buildGenericType(final Class<?> mainClass, final Class<?> assignableClass, final Object... parameters) throws CoreException {
return buildGenericType(mainClass, new Class<?>[] { assignableClass }, parameters);
} | java | public static Object buildGenericType(final Class<?> mainClass, final Class<?> assignableClass, final Object... parameters) throws CoreException {
return buildGenericType(mainClass, new Class<?>[] { assignableClass }, parameters);
} | [
"public",
"static",
"Object",
"buildGenericType",
"(",
"final",
"Class",
"<",
"?",
">",
"mainClass",
",",
"final",
"Class",
"<",
"?",
">",
"assignableClass",
",",
"final",
"Object",
"...",
"parameters",
")",
"throws",
"CoreException",
"{",
"return",
"buildGene... | Build the nth generic type of a class.
@param mainClass The main class used (that contain at least one generic type)
@param assignableClass the parent type of the generic to build
@param parameters used by the constructor of the generic type
@return a new instance of the generic type
@throws CoreException if the ins... | [
"Build",
"the",
"nth",
"generic",
"type",
"of",
"a",
"class",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L85-L87 |
8,496 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java | ClassUtility.buildGenericType | public static Object buildGenericType(final Class<?> mainClass, final Class<?>[] assignableClasses, final Object... constructorParameters) throws CoreException {
Class<?> genericClass = null;
// Copy parameters type to find the right constructor
final Class<?>[] constructorParameterTypes = new C... | java | public static Object buildGenericType(final Class<?> mainClass, final Class<?>[] assignableClasses, final Object... constructorParameters) throws CoreException {
Class<?> genericClass = null;
// Copy parameters type to find the right constructor
final Class<?>[] constructorParameterTypes = new C... | [
"public",
"static",
"Object",
"buildGenericType",
"(",
"final",
"Class",
"<",
"?",
">",
"mainClass",
",",
"final",
"Class",
"<",
"?",
">",
"[",
"]",
"assignableClasses",
",",
"final",
"Object",
"...",
"constructorParameters",
")",
"throws",
"CoreException",
"{... | Build the generic type according to assignable class.
@param mainClass The main class used (that contain at least one generic type)
@param assignableClasses if the array contains only one class it define the type of the generic to build, otherwise it defines the types to skip to find the obejct to build
@param constru... | [
"Build",
"the",
"generic",
"type",
"according",
"to",
"assignable",
"class",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L100-L147 |
8,497 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java | ClassUtility.findAndBuildGenericType | public static Object findAndBuildGenericType(final Class<?> mainClass, final Class<?> assignableClass, final Class<?> excludedClass, final Object... parameters) throws CoreException {
Object object = null;
final Class<?> objectClass = ClassUtility.findGenericClass(mainClass, assignableClass);
... | java | public static Object findAndBuildGenericType(final Class<?> mainClass, final Class<?> assignableClass, final Class<?> excludedClass, final Object... parameters) throws CoreException {
Object object = null;
final Class<?> objectClass = ClassUtility.findGenericClass(mainClass, assignableClass);
... | [
"public",
"static",
"Object",
"findAndBuildGenericType",
"(",
"final",
"Class",
"<",
"?",
">",
"mainClass",
",",
"final",
"Class",
"<",
"?",
">",
"assignableClass",
",",
"final",
"Class",
"<",
"?",
">",
"excludedClass",
",",
"final",
"Object",
"...",
"parame... | Find and Build the generic type according to assignable and excluded classes.
@param mainClass The main class used (that contains at least one generic type)
@param assignableClasses if the array contains only one class it define the type of the generic to build, otherwise it defines the types to skip to find the obejc... | [
"Find",
"and",
"Build",
"the",
"generic",
"type",
"according",
"to",
"assignable",
"and",
"excluded",
"classes",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L161-L170 |
8,498 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java | ClassUtility.getConstructor | private static Constructor<?> getConstructor(final Class<?> genericClass, final Class<?>[] constructorParameterTypes) {
Constructor<?> constructor = null;
try {
constructor = genericClass.getConstructor(constructorParameterTypes);
} catch (final NoSuchMethodException e) {
... | java | private static Constructor<?> getConstructor(final Class<?> genericClass, final Class<?>[] constructorParameterTypes) {
Constructor<?> constructor = null;
try {
constructor = genericClass.getConstructor(constructorParameterTypes);
} catch (final NoSuchMethodException e) {
... | [
"private",
"static",
"Constructor",
"<",
"?",
">",
"getConstructor",
"(",
"final",
"Class",
"<",
"?",
">",
"genericClass",
",",
"final",
"Class",
"<",
"?",
">",
"[",
"]",
"constructorParameterTypes",
")",
"{",
"Constructor",
"<",
"?",
">",
"constructor",
"... | Retrieve the constructor of a Type.
@param genericClass the type of the object
@param constructorParameterTypes an array of parameters' type to find the right constructor
@return the right constructor that matchers parameters | [
"Retrieve",
"the",
"constructor",
"of",
"a",
"Type",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L180-L192 |
8,499 | JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java | ClassUtility.underscoreToCamelCase | public static String underscoreToCamelCase(final String undescoredString) {
// Split the string for each underscore
final String[] parts = undescoredString.split(CASE_SEPARATOR);
final StringBuilder camelCaseString = new StringBuilder(undescoredString.length());
camelCaseString.append(p... | java | public static String underscoreToCamelCase(final String undescoredString) {
// Split the string for each underscore
final String[] parts = undescoredString.split(CASE_SEPARATOR);
final StringBuilder camelCaseString = new StringBuilder(undescoredString.length());
camelCaseString.append(p... | [
"public",
"static",
"String",
"underscoreToCamelCase",
"(",
"final",
"String",
"undescoredString",
")",
"{",
"// Split the string for each underscore",
"final",
"String",
"[",
"]",
"parts",
"=",
"undescoredString",
".",
"split",
"(",
"CASE_SEPARATOR",
")",
";",
"final... | Convert A_STRING_UNDESCORED into aStringUnderscored.
@param undescoredString the string to convert
@return the string with camelCase | [
"Convert",
"A_STRING_UNDESCORED",
"into",
"aStringUnderscored",
"."
] | 93f4fc087b83c73db540333b9686e97b4cec694d | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L251-L267 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.