repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/ProgrammaticWrappingProxyInstaller.java
ProgrammaticWrappingProxyInstaller.wrap
public ConstructorDoc wrap(ConstructorDoc source) { if (source == null || source instanceof Proxy<?> || !(source instanceof ConstructorDocImpl)) { return source; } return new ConstructorDocWrapper((ConstructorDocImpl) source); }
java
public ConstructorDoc wrap(ConstructorDoc source) { if (source == null || source instanceof Proxy<?> || !(source instanceof ConstructorDocImpl)) { return source; } return new ConstructorDocWrapper((ConstructorDocImpl) source); }
[ "public", "ConstructorDoc", "wrap", "(", "ConstructorDoc", "source", ")", "{", "if", "(", "source", "==", "null", "||", "source", "instanceof", "Proxy", "<", "?", ">", "||", "!", "(", "source", "instanceof", "ConstructorDocImpl", ")", ")", "{", "return", "...
Wrap a constructor doc. @param source the source @return the wrapper.
[ "Wrap", "a", "constructor", "doc", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/ProgrammaticWrappingProxyInstaller.java#L260-L265
train
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/ProgrammaticWrappingProxyInstaller.java
ProgrammaticWrappingProxyInstaller.wrap
public MethodDoc wrap(MethodDoc source) { if (source == null || source instanceof Proxy<?> || !(source instanceof MethodDocImpl)) { return source; } return new MethodDocWrapper((MethodDocImpl) source); }
java
public MethodDoc wrap(MethodDoc source) { if (source == null || source instanceof Proxy<?> || !(source instanceof MethodDocImpl)) { return source; } return new MethodDocWrapper((MethodDocImpl) source); }
[ "public", "MethodDoc", "wrap", "(", "MethodDoc", "source", ")", "{", "if", "(", "source", "==", "null", "||", "source", "instanceof", "Proxy", "<", "?", ">", "||", "!", "(", "source", "instanceof", "MethodDocImpl", ")", ")", "{", "return", "source", ";",...
Wrap a method doc. @param source the source @return the wrapper.
[ "Wrap", "a", "method", "doc", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/ProgrammaticWrappingProxyInstaller.java#L290-L295
train
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/ProgrammaticWrappingProxyInstaller.java
ProgrammaticWrappingProxyInstaller.wrap
public AnnotationTypeElementDoc wrap(AnnotationTypeElementDoc source) { if (source == null || source instanceof Proxy<?> || !(source instanceof AnnotationTypeElementDocImpl)) { return source; } return new AnnotationTypeElementDocWrapper((AnnotationTypeElementDocImpl) source); }
java
public AnnotationTypeElementDoc wrap(AnnotationTypeElementDoc source) { if (source == null || source instanceof Proxy<?> || !(source instanceof AnnotationTypeElementDocImpl)) { return source; } return new AnnotationTypeElementDocWrapper((AnnotationTypeElementDocImpl) source); }
[ "public", "AnnotationTypeElementDoc", "wrap", "(", "AnnotationTypeElementDoc", "source", ")", "{", "if", "(", "source", "==", "null", "||", "source", "instanceof", "Proxy", "<", "?", ">", "||", "!", "(", "source", "instanceof", "AnnotationTypeElementDocImpl", ")",...
Wrap a annotation type element doc. @param source the source @return the wrapper.
[ "Wrap", "a", "annotation", "type", "element", "doc", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/ProgrammaticWrappingProxyInstaller.java#L332-L337
train
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java
TimeExtensions.seconds
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_SECOND)", imported = {TimeExtensions.class}) public static long seconds(Number secs) { return (long) (secs.doubleValue() * MILLIS_IN_SECOND); }
java
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_SECOND)", imported = {TimeExtensions.class}) public static long seconds(Number secs) { return (long) (secs.doubleValue() * MILLIS_IN_SECOND); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"(long) (($1).doubleValue() * $2.MILLIS_IN_SECOND)\"", ",", "imported", "=", "{", "TimeExtensions", ".", "class", "}", ")", "public", "static", "long", "seconds", "(", "Number", "secs", ")", "{", "return", "(", ...
Convert seconds to milliseconds. @param secs number of seconds to convert. @return the number of milliseconds in seconds.
[ "Convert", "seconds", "to", "milliseconds", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java#L156-L160
train
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java
TimeExtensions.minutes
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_MINUTE)", imported = {TimeExtensions.class}) public static long minutes(Number mins) { return (long) (mins.doubleValue() * MILLIS_IN_MINUTE); }
java
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_MINUTE)", imported = {TimeExtensions.class}) public static long minutes(Number mins) { return (long) (mins.doubleValue() * MILLIS_IN_MINUTE); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"(long) (($1).doubleValue() * $2.MILLIS_IN_MINUTE)\"", ",", "imported", "=", "{", "TimeExtensions", ".", "class", "}", ")", "public", "static", "long", "minutes", "(", "Number", "mins", ")", "{", "return", "(", ...
Convert minutes to milliseconds. @param mins number of minutes to convert. @return the number of milliseconds in <code>mins</code>
[ "Convert", "minutes", "to", "milliseconds", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java#L233-L237
train
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java
TimeExtensions.hours
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_HOUR)", imported = {TimeExtensions.class}) public static long hours(Number hours) { return (long) (hours.doubleValue() * MILLIS_IN_HOUR); }
java
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_HOUR)", imported = {TimeExtensions.class}) public static long hours(Number hours) { return (long) (hours.doubleValue() * MILLIS_IN_HOUR); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"(long) (($1).doubleValue() * $2.MILLIS_IN_HOUR)\"", ",", "imported", "=", "{", "TimeExtensions", ".", "class", "}", ")", "public", "static", "long", "hours", "(", "Number", "hours", ")", "{", "return", "(", "lo...
Convert hours to milliseconds. @param hours number of hours to convert. @return the number of milliseconds in <code>hours</code>
[ "Convert", "hours", "to", "milliseconds", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java#L310-L314
train
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java
TimeExtensions.days
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_DAY)", imported = {TimeExtensions.class}) public static long days(Number days) { return (long) (days.doubleValue() * MILLIS_IN_DAY); }
java
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_DAY)", imported = {TimeExtensions.class}) public static long days(Number days) { return (long) (days.doubleValue() * MILLIS_IN_DAY); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"(long) (($1).doubleValue() * $2.MILLIS_IN_DAY)\"", ",", "imported", "=", "{", "TimeExtensions", ".", "class", "}", ")", "public", "static", "long", "days", "(", "Number", "days", ")", "{", "return", "(", "long"...
Convert days to milliseconds. @param days number of days to convert. @return the number of days in <code>days</code>
[ "Convert", "days", "to", "milliseconds", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java#L387-L391
train
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java
TimeExtensions.weeks
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_WEEK)", imported = {TimeExtensions.class}) public static long weeks(Number weeks) { return (long) (weeks.doubleValue() * MILLIS_IN_WEEK); }
java
@Pure @Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_WEEK)", imported = {TimeExtensions.class}) public static long weeks(Number weeks) { return (long) (weeks.doubleValue() * MILLIS_IN_WEEK); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"(long) (($1).doubleValue() * $2.MILLIS_IN_WEEK)\"", ",", "imported", "=", "{", "TimeExtensions", ".", "class", "}", ")", "public", "static", "long", "weeks", "(", "Number", "weeks", ")", "{", "return", "(", "lo...
Convert weeks to milliseconds. @param weeks number of weeks to convert. @return the number of milliseconds in <code>weeks</code>
[ "Convert", "weeks", "to", "milliseconds", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java#L464-L468
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/SARLStandaloneSetup.java
SARLStandaloneSetup.createInjectorAndDoEMFRegistration
public Injector createInjectorAndDoEMFRegistration(Module... modules) { doPreSetup(); final Injector injector = createInjector(modules); register(injector); return injector; }
java
public Injector createInjectorAndDoEMFRegistration(Module... modules) { doPreSetup(); final Injector injector = createInjector(modules); register(injector); return injector; }
[ "public", "Injector", "createInjectorAndDoEMFRegistration", "(", "Module", "...", "modules", ")", "{", "doPreSetup", "(", ")", ";", "final", "Injector", "injector", "=", "createInjector", "(", "modules", ")", ";", "register", "(", "injector", ")", ";", "return",...
Create the injector based on the given set of modules and prepare the EMF infrastructure. @param modules the injection modules that are overriding the standard SARL module. @return the injector. @since 0.8 @see SARLRuntimeModule
[ "Create", "the", "injector", "based", "on", "the", "given", "set", "of", "modules", "and", "prepare", "the", "EMF", "infrastructure", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/SARLStandaloneSetup.java#L97-L102
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/SARLStandaloneSetup.java
SARLStandaloneSetup.createInjector
@SuppressWarnings("static-method") public Injector createInjector(Module... modules) { return Guice.createInjector(Modules.override(new SARLRuntimeModule()).with(modules)); }
java
@SuppressWarnings("static-method") public Injector createInjector(Module... modules) { return Guice.createInjector(Modules.override(new SARLRuntimeModule()).with(modules)); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "public", "Injector", "createInjector", "(", "Module", "...", "modules", ")", "{", "return", "Guice", ".", "createInjector", "(", "Modules", ".", "override", "(", "new", "SARLRuntimeModule", "(", ")", ")", ...
Create the injectors based on the given set of modules. @param modules the injection modules that are overriding the standard SARL module. @return the injector. @since 0.8 @see SARLRuntimeModule
[ "Create", "the", "injectors", "based", "on", "the", "given", "set", "of", "modules", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/SARLStandaloneSetup.java#L111-L114
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/BuiltinSkill.java
BuiltinSkill.installationOrder
protected static int installationOrder(Skill skill) { final int len = StandardBuiltinCapacitiesProvider.SKILL_INSTALLATION_ORDER.length; if (skill instanceof BuiltinSkill) { for (int i = 0; i < len; ++i) { final Class<? extends Skill> type = StandardBuiltinCapacitiesProvider.SKILL_INSTALLATION_ORDER[i]; ...
java
protected static int installationOrder(Skill skill) { final int len = StandardBuiltinCapacitiesProvider.SKILL_INSTALLATION_ORDER.length; if (skill instanceof BuiltinSkill) { for (int i = 0; i < len; ++i) { final Class<? extends Skill> type = StandardBuiltinCapacitiesProvider.SKILL_INSTALLATION_ORDER[i]; ...
[ "protected", "static", "int", "installationOrder", "(", "Skill", "skill", ")", "{", "final", "int", "len", "=", "StandardBuiltinCapacitiesProvider", ".", "SKILL_INSTALLATION_ORDER", ".", "length", ";", "if", "(", "skill", "instanceof", "BuiltinSkill", ")", "{", "f...
Replies the installation order of the given skill. @param skill the skill. @return the installation order.
[ "Replies", "the", "installation", "order", "of", "the", "given", "skill", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/BuiltinSkill.java#L56-L67
train
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sreinstall/SREInstallWizard.java
SREInstallWizard.getPage
public AbstractSREInstallPage getPage(ISREInstall sre) { final IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint( SARLEclipsePlugin.PLUGIN_ID, SARLEclipseConfig.EXTENSION_POINT_SRE_INSTALL_PAGES); if (sre != null && extensionPoint != null) { IConfigurationElement firstTyp...
java
public AbstractSREInstallPage getPage(ISREInstall sre) { final IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint( SARLEclipsePlugin.PLUGIN_ID, SARLEclipseConfig.EXTENSION_POINT_SRE_INSTALL_PAGES); if (sre != null && extensionPoint != null) { IConfigurationElement firstTyp...
[ "public", "AbstractSREInstallPage", "getPage", "(", "ISREInstall", "sre", ")", "{", "final", "IExtensionPoint", "extensionPoint", "=", "Platform", ".", "getExtensionRegistry", "(", ")", ".", "getExtensionPoint", "(", "SARLEclipsePlugin", ".", "PLUGIN_ID", ",", "SARLEc...
Returns a page to use for editing a SRE install type. @param sre the edited SRE. @return the wizard page.
[ "Returns", "a", "page", "to", "use", "for", "editing", "a", "SRE", "install", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sreinstall/SREInstallWizard.java#L96-L139
train
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/SARLEditorErrorTickUpdater.java
SARLEditorErrorTickUpdater.getXtextResource
protected Resource getXtextResource() { //FIXME: for helping to resolve #661 final XtextEditor editor = getEditor(); if (editor != null) { final IResource resource = editor.getResource(); if (resource instanceof IStorage) { final IProject project = resource.getProject(); if (project != null) { ...
java
protected Resource getXtextResource() { //FIXME: for helping to resolve #661 final XtextEditor editor = getEditor(); if (editor != null) { final IResource resource = editor.getResource(); if (resource instanceof IStorage) { final IProject project = resource.getProject(); if (project != null) { ...
[ "protected", "Resource", "getXtextResource", "(", ")", "{", "//FIXME: for helping to resolve #661", "final", "XtextEditor", "editor", "=", "getEditor", "(", ")", ";", "if", "(", "editor", "!=", "null", ")", "{", "final", "IResource", "resource", "=", "editor", "...
Replies the current Xtext document that is supported by the linked editor. @return the Xtext document, or {@code null} if neither an editor nor a Xtext document was linked.
[ "Replies", "the", "current", "Xtext", "document", "that", "is", "supported", "by", "the", "linked", "editor", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/SARLEditorErrorTickUpdater.java#L94-L110
train
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java
ExpressionBuilderFragment.generateExpressionAppender
protected void generateExpressionAppender() { final TypeReference builderInterface = getExpressionBuilderInterface(); final TypeReference appender = getCodeElementExtractor().getElementAppenderImpl("Expression"); //$NON-NLS-1$ final StringConcatenationClient content = new StringConcatenationClient() { @Overrid...
java
protected void generateExpressionAppender() { final TypeReference builderInterface = getExpressionBuilderInterface(); final TypeReference appender = getCodeElementExtractor().getElementAppenderImpl("Expression"); //$NON-NLS-1$ final StringConcatenationClient content = new StringConcatenationClient() { @Overrid...
[ "protected", "void", "generateExpressionAppender", "(", ")", "{", "final", "TypeReference", "builderInterface", "=", "getExpressionBuilderInterface", "(", ")", ";", "final", "TypeReference", "appender", "=", "getCodeElementExtractor", "(", ")", ".", "getElementAppenderImp...
Generate the expression appender.
[ "Generate", "the", "expression", "appender", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java#L171-L203
train
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java
ExpressionBuilderFragment.ensureContainerKeyword
protected String ensureContainerKeyword(EObject grammarContainer) { final Iterator<Keyword> iterator = Iterators.filter(grammarContainer.eContents().iterator(), Keyword.class); if (iterator.hasNext()) { return iterator.next().getValue(); } return getExpressionConfig().getFieldContainerDeclarationKeyword(); ...
java
protected String ensureContainerKeyword(EObject grammarContainer) { final Iterator<Keyword> iterator = Iterators.filter(grammarContainer.eContents().iterator(), Keyword.class); if (iterator.hasNext()) { return iterator.next().getValue(); } return getExpressionConfig().getFieldContainerDeclarationKeyword(); ...
[ "protected", "String", "ensureContainerKeyword", "(", "EObject", "grammarContainer", ")", "{", "final", "Iterator", "<", "Keyword", ">", "iterator", "=", "Iterators", ".", "filter", "(", "grammarContainer", ".", "eContents", "(", ")", ".", "iterator", "(", ")", ...
Replies a keyword for declaring a container. @param grammarContainer the container description. @return the keyword, never <code>null</code> nor an empty string.
[ "Replies", "a", "keyword", "for", "declaring", "a", "container", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java#L1158-L1164
train
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java
ExpressionBuilderFragment.ensureFieldDeclarationKeyword
protected String ensureFieldDeclarationKeyword(CodeElementExtractor.ElementDescription memberDescription) { final List<String> modifiers = getCodeBuilderConfig().getModifiers().get(memberDescription.getName()); if (modifiers != null && !modifiers.isEmpty()) { return modifiers.get(0); } return getExpressionCo...
java
protected String ensureFieldDeclarationKeyword(CodeElementExtractor.ElementDescription memberDescription) { final List<String> modifiers = getCodeBuilderConfig().getModifiers().get(memberDescription.getName()); if (modifiers != null && !modifiers.isEmpty()) { return modifiers.get(0); } return getExpressionCo...
[ "protected", "String", "ensureFieldDeclarationKeyword", "(", "CodeElementExtractor", ".", "ElementDescription", "memberDescription", ")", "{", "final", "List", "<", "String", ">", "modifiers", "=", "getCodeBuilderConfig", "(", ")", ".", "getModifiers", "(", ")", ".", ...
Replies a keyword for declaring a field. @param memberDescription the member description. @return the keyword, never <code>null</code> nor an empty string.
[ "Replies", "a", "keyword", "for", "declaring", "a", "field", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java#L1171-L1177
train
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java
ExpressionBuilderFragment.getExpressionContextDescription
protected ExpressionContextDescription getExpressionContextDescription() { for (final CodeElementExtractor.ElementDescription containerDescription : getCodeElementExtractor().getTopElements( getGrammar(), getCodeBuilderConfig())) { final AbstractRule rule = getMemberRule(containerDescription); if (rule != n...
java
protected ExpressionContextDescription getExpressionContextDescription() { for (final CodeElementExtractor.ElementDescription containerDescription : getCodeElementExtractor().getTopElements( getGrammar(), getCodeBuilderConfig())) { final AbstractRule rule = getMemberRule(containerDescription); if (rule != n...
[ "protected", "ExpressionContextDescription", "getExpressionContextDescription", "(", ")", "{", "for", "(", "final", "CodeElementExtractor", ".", "ElementDescription", "containerDescription", ":", "getCodeElementExtractor", "(", ")", ".", "getTopElements", "(", "getGrammar", ...
Replies the description of the expression context. @return the description.
[ "Replies", "the", "description", "of", "the", "expression", "context", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/ExpressionBuilderFragment.java#L1183-L1215
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/contextspace/Context.java
Context.postConstruction
public EventSpace postConstruction() { this.spaceRepository.postConstruction(); this.defaultSpace = createSpace(OpenEventSpaceSpecification.class, this.defaultSpaceID); if (this.defaultSpace == null) { // The default space could have been created before thanks to Hazelcast, // thus createSpace returns null ...
java
public EventSpace postConstruction() { this.spaceRepository.postConstruction(); this.defaultSpace = createSpace(OpenEventSpaceSpecification.class, this.defaultSpaceID); if (this.defaultSpace == null) { // The default space could have been created before thanks to Hazelcast, // thus createSpace returns null ...
[ "public", "EventSpace", "postConstruction", "(", ")", "{", "this", ".", "spaceRepository", ".", "postConstruction", "(", ")", ";", "this", ".", "defaultSpace", "=", "createSpace", "(", "OpenEventSpaceSpecification", ".", "class", ",", "this", ".", "defaultSpaceID"...
Create the default space in this context. @return the created space.
[ "Create", "the", "default", "space", "in", "this", "context", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/contextspace/Context.java#L100-L111
train
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/highlighting/SARLHighlightingConfiguration.java
SARLHighlightingConfiguration.capacityMethodInvocation
@SuppressWarnings("checkstyle:magicnumber") public TextStyle capacityMethodInvocation() { final TextStyle textStyle = extensionMethodInvocation().copy(); //textStyle.setColor(new RGB(128, 36, 0)); textStyle.setStyle(SWT.ITALIC); return textStyle; }
java
@SuppressWarnings("checkstyle:magicnumber") public TextStyle capacityMethodInvocation() { final TextStyle textStyle = extensionMethodInvocation().copy(); //textStyle.setColor(new RGB(128, 36, 0)); textStyle.setStyle(SWT.ITALIC); return textStyle; }
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "public", "TextStyle", "capacityMethodInvocation", "(", ")", "{", "final", "TextStyle", "textStyle", "=", "extensionMethodInvocation", "(", ")", ".", "copy", "(", ")", ";", "//textStyle.setColor(new RGB(12...
Style for the capacity method extension. @return the style.
[ "Style", "for", "the", "capacity", "method", "extension", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/highlighting/SARLHighlightingConfiguration.java#L55-L61
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.validate
public void validate(StateAccess validationState, ValidationMessageAcceptor messageAcceptor) { if (isResponsible(validationState.getState().context, validationState.getState().currentObject)) { try { for (final MethodWrapper method : getMethods(validationState.getState().currentObject)) { final Context ct...
java
public void validate(StateAccess validationState, ValidationMessageAcceptor messageAcceptor) { if (isResponsible(validationState.getState().context, validationState.getState().currentObject)) { try { for (final MethodWrapper method : getMethods(validationState.getState().currentObject)) { final Context ct...
[ "public", "void", "validate", "(", "StateAccess", "validationState", ",", "ValidationMessageAcceptor", "messageAcceptor", ")", "{", "if", "(", "isResponsible", "(", "validationState", ".", "getState", "(", ")", ".", "context", ",", "validationState", ".", "getState"...
Validate the given resource. @param validationState the current validation state. @param messageAcceptor the message acceptor.
[ "Validate", "the", "given", "resource", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L160-L173
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.collectMethods
protected void collectMethods(Class<? extends AbstractExtraLanguageValidator> clazz, Collection<Class<?>> visitedClasses, Collection<MethodWrapper> result) { if (!visitedClasses.add(clazz)) { return; } for (final Method method : clazz.getDeclaredMethods()) { if (method.getAnnotation(Check.class) != nu...
java
protected void collectMethods(Class<? extends AbstractExtraLanguageValidator> clazz, Collection<Class<?>> visitedClasses, Collection<MethodWrapper> result) { if (!visitedClasses.add(clazz)) { return; } for (final Method method : clazz.getDeclaredMethods()) { if (method.getAnnotation(Check.class) != nu...
[ "protected", "void", "collectMethods", "(", "Class", "<", "?", "extends", "AbstractExtraLanguageValidator", ">", "clazz", ",", "Collection", "<", "Class", "<", "?", ">", ">", "visitedClasses", ",", "Collection", "<", "MethodWrapper", ">", "result", ")", "{", "...
Collect the check methods. @param clazz the type to explore. @param visitedClasses the visited classes. @param result the collected methods.
[ "Collect", "the", "check", "methods", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L181-L196
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.isResponsible
@SuppressWarnings("static-method") protected boolean isResponsible(Map<Object, Object> context, EObject eObject) { // Skip the validation of an feature call if one of its container was validated previously if (eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall) { final XAbstractFeatureCall...
java
@SuppressWarnings("static-method") protected boolean isResponsible(Map<Object, Object> context, EObject eObject) { // Skip the validation of an feature call if one of its container was validated previously if (eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall) { final XAbstractFeatureCall...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isResponsible", "(", "Map", "<", "Object", ",", "Object", ">", "context", ",", "EObject", "eObject", ")", "{", "// Skip the validation of an feature call if one of its container was validated p...
Replies if the validator is responsible to validate the given object. @param context the context. @param eObject the validated object. @return {@code true} if the validator could be run.
[ "Replies", "if", "the", "validator", "is", "responsible", "to", "validate", "the", "given", "object", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L245-L253
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.error
protected void error(String message, EObject source, EStructuralFeature feature) { getContext().getMessageAcceptor().acceptError( MessageFormat.format(getErrorMessageFormat(), message), source, feature, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, IssueCodes.INVALID_EXTRA_LANGUAGE_GENERATION); ...
java
protected void error(String message, EObject source, EStructuralFeature feature) { getContext().getMessageAcceptor().acceptError( MessageFormat.format(getErrorMessageFormat(), message), source, feature, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, IssueCodes.INVALID_EXTRA_LANGUAGE_GENERATION); ...
[ "protected", "void", "error", "(", "String", "message", ",", "EObject", "source", ",", "EStructuralFeature", "feature", ")", "{", "getContext", "(", ")", ".", "getMessageAcceptor", "(", ")", ".", "acceptError", "(", "MessageFormat", ".", "format", "(", "getErr...
Generate an error for the extra-language. <p>This function generates an error, a warning, or an information depending on the extra-language generation's configuration. @param message the error message. @param source the source of the error. @param feature the structural feature.
[ "Generate", "an", "error", "for", "the", "extra", "-", "language", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L264-L271
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.warning
protected void warning(String message, EObject source, EStructuralFeature feature) { getContext().getMessageAcceptor().acceptWarning( MessageFormat.format(getErrorMessageFormat(), message), source, feature, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, IssueCodes.INVALID_EXTRA_LANGUAGE_GENERATION...
java
protected void warning(String message, EObject source, EStructuralFeature feature) { getContext().getMessageAcceptor().acceptWarning( MessageFormat.format(getErrorMessageFormat(), message), source, feature, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, IssueCodes.INVALID_EXTRA_LANGUAGE_GENERATION...
[ "protected", "void", "warning", "(", "String", "message", ",", "EObject", "source", ",", "EStructuralFeature", "feature", ")", "{", "getContext", "(", ")", ".", "getMessageAcceptor", "(", ")", ".", "acceptWarning", "(", "MessageFormat", ".", "format", "(", "ge...
Generate a warning for the extra-language. <p>This function generates an error, a warning, or an information depending on the extra-language generation's configuration. @param message the warning message. @param source the source of the error. @param feature the structural feature.
[ "Generate", "a", "warning", "for", "the", "extra", "-", "language", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L282-L289
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.info
protected void info(String message, EObject source, EStructuralFeature feature) { getContext().getMessageAcceptor().acceptInfo( MessageFormat.format(getErrorMessageFormat(), message), source, feature, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, IssueCodes.INVALID_EXTRA_LANGUAGE_GENERATION); }
java
protected void info(String message, EObject source, EStructuralFeature feature) { getContext().getMessageAcceptor().acceptInfo( MessageFormat.format(getErrorMessageFormat(), message), source, feature, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, IssueCodes.INVALID_EXTRA_LANGUAGE_GENERATION); }
[ "protected", "void", "info", "(", "String", "message", ",", "EObject", "source", ",", "EStructuralFeature", "feature", ")", "{", "getContext", "(", ")", ".", "getMessageAcceptor", "(", ")", ".", "acceptInfo", "(", "MessageFormat", ".", "format", "(", "getError...
Generate an information message for the extra-language. <p>This function generates an error, a warning, or an information depending on the extra-language generation's configuration. @param message the info message. @param source the source of the error. @param feature the structural feature.
[ "Generate", "an", "information", "message", "for", "the", "extra", "-", "language", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L300-L307
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.getTypeConverter
public ExtraLanguageTypeConverter getTypeConverter() { ExtraLanguageTypeConverter converter = this.typeConverter; if (converter == null) { converter = createTypeConverterInstance(getTypeConverterInitializer(), null); this.injector.injectMembers(converter); this.typeConverter = converter; } return conve...
java
public ExtraLanguageTypeConverter getTypeConverter() { ExtraLanguageTypeConverter converter = this.typeConverter; if (converter == null) { converter = createTypeConverterInstance(getTypeConverterInitializer(), null); this.injector.injectMembers(converter); this.typeConverter = converter; } return conve...
[ "public", "ExtraLanguageTypeConverter", "getTypeConverter", "(", ")", "{", "ExtraLanguageTypeConverter", "converter", "=", "this", ".", "typeConverter", ";", "if", "(", "converter", "==", "null", ")", "{", "converter", "=", "createTypeConverterInstance", "(", "getType...
Replies the type converter. @return the type converter.
[ "Replies", "the", "type", "converter", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L334-L342
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.createTypeConverterInstance
@SuppressWarnings("static-method") protected ExtraLanguageTypeConverter createTypeConverterInstance( IExtraLanguageConversionInitializer initializer, IExtraLanguageGeneratorContext context) { return new ExtraLanguageTypeConverter(initializer, context); }
java
@SuppressWarnings("static-method") protected ExtraLanguageTypeConverter createTypeConverterInstance( IExtraLanguageConversionInitializer initializer, IExtraLanguageGeneratorContext context) { return new ExtraLanguageTypeConverter(initializer, context); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "ExtraLanguageTypeConverter", "createTypeConverterInstance", "(", "IExtraLanguageConversionInitializer", "initializer", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "return", "new", "ExtraLanguage...
Create the instance of the type converter. @param initializer the converter initializer. @param context the generation context. @return the type converter.
[ "Create", "the", "instance", "of", "the", "type", "converter", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L350-L355
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.getFeatureNameConverter
public ExtraLanguageFeatureNameConverter getFeatureNameConverter() { ExtraLanguageFeatureNameConverter converter = this.featureConverter; if (converter == null) { converter = createFeatureNameConverterInstance(getFeatureConverterInitializer(), null); this.injector.injectMembers(converter); this.featureConv...
java
public ExtraLanguageFeatureNameConverter getFeatureNameConverter() { ExtraLanguageFeatureNameConverter converter = this.featureConverter; if (converter == null) { converter = createFeatureNameConverterInstance(getFeatureConverterInitializer(), null); this.injector.injectMembers(converter); this.featureConv...
[ "public", "ExtraLanguageFeatureNameConverter", "getFeatureNameConverter", "(", ")", "{", "ExtraLanguageFeatureNameConverter", "converter", "=", "this", ".", "featureConverter", ";", "if", "(", "converter", "==", "null", ")", "{", "converter", "=", "createFeatureNameConver...
Replies the feature name converter. @return the feature name converter.
[ "Replies", "the", "feature", "name", "converter", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L361-L369
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.createFeatureNameConverterInstance
protected ExtraLanguageFeatureNameConverter createFeatureNameConverterInstance( IExtraLanguageConversionInitializer initializer, IExtraLanguageGeneratorContext context) { return new ExtraLanguageFeatureNameConverter(initializer, context, getExtraLanguageKeywordProvider()); }
java
protected ExtraLanguageFeatureNameConverter createFeatureNameConverterInstance( IExtraLanguageConversionInitializer initializer, IExtraLanguageGeneratorContext context) { return new ExtraLanguageFeatureNameConverter(initializer, context, getExtraLanguageKeywordProvider()); }
[ "protected", "ExtraLanguageFeatureNameConverter", "createFeatureNameConverterInstance", "(", "IExtraLanguageConversionInitializer", "initializer", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "return", "new", "ExtraLanguageFeatureNameConverter", "(", "initializer", ","...
Create the instance of the feature name converter. @param initializer the converter initializer. @param context the generation context. @return the feature name converter.
[ "Create", "the", "instance", "of", "the", "feature", "name", "converter", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L377-L381
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.doTypeMappingCheck
protected boolean doTypeMappingCheck(EObject source, JvmType type, Procedure3<? super EObject, ? super JvmType, ? super String> errorHandler) { if (source != null && type != null) { final ExtraLanguageTypeConverter converter = getTypeConverter(); final String qn = type.getQualifiedName(); if (converter != nu...
java
protected boolean doTypeMappingCheck(EObject source, JvmType type, Procedure3<? super EObject, ? super JvmType, ? super String> errorHandler) { if (source != null && type != null) { final ExtraLanguageTypeConverter converter = getTypeConverter(); final String qn = type.getQualifiedName(); if (converter != nu...
[ "protected", "boolean", "doTypeMappingCheck", "(", "EObject", "source", ",", "JvmType", "type", ",", "Procedure3", "<", "?", "super", "EObject", ",", "?", "super", "JvmType", ",", "?", "super", "String", ">", "errorHandler", ")", "{", "if", "(", "source", ...
Do a type mapping check. @param source the source of the type. @param type the type to check. @param errorHandler the error handler. @return {@code true} if a type mapping is defined.
[ "Do", "a", "type", "mapping", "check", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L390-L402
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.doCheckMemberFeatureCallMapping
protected void doCheckMemberFeatureCallMapping(XAbstractFeatureCall featureCall, Procedure3<? super EObject, ? super JvmType, ? super String> typeErrorHandler, Function2<? super EObject, ? super JvmIdentifiableElement, ? extends Boolean> featureErrorHandler) { final XAbstractFeatureCall rootFeatureCall = Utils....
java
protected void doCheckMemberFeatureCallMapping(XAbstractFeatureCall featureCall, Procedure3<? super EObject, ? super JvmType, ? super String> typeErrorHandler, Function2<? super EObject, ? super JvmIdentifiableElement, ? extends Boolean> featureErrorHandler) { final XAbstractFeatureCall rootFeatureCall = Utils....
[ "protected", "void", "doCheckMemberFeatureCallMapping", "(", "XAbstractFeatureCall", "featureCall", ",", "Procedure3", "<", "?", "super", "EObject", ",", "?", "super", "JvmType", ",", "?", "super", "String", ">", "typeErrorHandler", ",", "Function2", "<", "?", "su...
Check if the feature call could be translated to the extra-language. @param featureCall the feature call. @param typeErrorHandler the error handler for the type conversion. @param featureErrorHandler the error handler for the feature call conversion.
[ "Check", "if", "the", "feature", "call", "could", "be", "translated", "to", "the", "extra", "-", "language", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L432-L445
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.handleInvocationTargetException
@SuppressWarnings("static-method") protected void handleInvocationTargetException(Throwable targetException, Context context) { // ignore NullPointerException, as not having to check for NPEs all the time is a convenience feature if (!(targetException instanceof NullPointerException)) { Exceptions.throwUnchecke...
java
@SuppressWarnings("static-method") protected void handleInvocationTargetException(Throwable targetException, Context context) { // ignore NullPointerException, as not having to check for NPEs all the time is a convenience feature if (!(targetException instanceof NullPointerException)) { Exceptions.throwUnchecke...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "void", "handleInvocationTargetException", "(", "Throwable", "targetException", ",", "Context", "context", ")", "{", "// ignore NullPointerException, as not having to check for NPEs all the time is a convenience fea...
Handle an exception. @param targetException the exception. @param context the context.
[ "Handle", "an", "exception", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L488-L494
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SARLJvmGenerator.java
SARLJvmGenerator.generateStaticConstructor
protected ITreeAppendable generateStaticConstructor(JvmOperation it, ITreeAppendable appendable, GeneratorConfig config) { appendable.newLine(); appendable.openScope(); generateJavaDoc(it, appendable, config); final ITreeAppendable tracedAppendable = appendable.trace(it); tracedAppendable.append("static "); /...
java
protected ITreeAppendable generateStaticConstructor(JvmOperation it, ITreeAppendable appendable, GeneratorConfig config) { appendable.newLine(); appendable.openScope(); generateJavaDoc(it, appendable, config); final ITreeAppendable tracedAppendable = appendable.trace(it); tracedAppendable.append("static "); /...
[ "protected", "ITreeAppendable", "generateStaticConstructor", "(", "JvmOperation", "it", ",", "ITreeAppendable", "appendable", ",", "GeneratorConfig", "config", ")", "{", "appendable", ".", "newLine", "(", ")", ";", "appendable", ".", "openScope", "(", ")", ";", "g...
Generate a static constructor from the given Jvm constructor. @param it the container of the code. @param appendable the output. @param config the generation configuration. @return the appendable.
[ "Generate", "a", "static", "constructor", "from", "the", "given", "Jvm", "constructor", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SARLJvmGenerator.java#L129-L137
train
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/SubmitEclipseLogWizard.java
SubmitEclipseLogWizard.open
public static int open(Shell parentShell) { final SubmitEclipseLogWizard wizard = new SubmitEclipseLogWizard(); final WizardDialog dialog = new WizardDialog(parentShell, wizard); wizard.setWizardDialog(dialog); return dialog.open(); }
java
public static int open(Shell parentShell) { final SubmitEclipseLogWizard wizard = new SubmitEclipseLogWizard(); final WizardDialog dialog = new WizardDialog(parentShell, wizard); wizard.setWizardDialog(dialog); return dialog.open(); }
[ "public", "static", "int", "open", "(", "Shell", "parentShell", ")", "{", "final", "SubmitEclipseLogWizard", "wizard", "=", "new", "SubmitEclipseLogWizard", "(", ")", ";", "final", "WizardDialog", "dialog", "=", "new", "WizardDialog", "(", "parentShell", ",", "w...
Open the wizard. <p>This method waits until the window is closed by the end user, and then it returns the window's return code; otherwise, this method returns immediately. A window's return codes are window-specific, although two standard return codes are predefined: <code>OK</code> and <code>CANCEL</code>. </p> @par...
[ "Open", "the", "wizard", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/SubmitEclipseLogWizard.java#L103-L108
train
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/SubmitEclipseLogWizard.java
SubmitEclipseLogWizard.getWizardDialog
WizardDialog getWizardDialog() { final WeakReference<WizardDialog> ref = this.wizardDialog; return (ref == null) ? null : ref.get(); }
java
WizardDialog getWizardDialog() { final WeakReference<WizardDialog> ref = this.wizardDialog; return (ref == null) ? null : ref.get(); }
[ "WizardDialog", "getWizardDialog", "(", ")", "{", "final", "WeakReference", "<", "WizardDialog", ">", "ref", "=", "this", ".", "wizardDialog", ";", "return", "(", "ref", "==", "null", ")", "?", "null", ":", "ref", ".", "get", "(", ")", ";", "}" ]
Replies the associated wieard dialog. @return the dialog.
[ "Replies", "the", "associated", "wieard", "dialog", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/SubmitEclipseLogWizard.java#L123-L126
train
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/SubmitEclipseLogWizard.java
SubmitEclipseLogWizard.buildContent
@SuppressWarnings("static-method") protected String buildContent(String description, Charset charset) throws IOException { final StringBuilder fullContent = new StringBuilder(); // User message if (!Strings.isEmpty(description)) { fullContent.append(description); fullContent.append(Messages.SubmitEclipseL...
java
@SuppressWarnings("static-method") protected String buildContent(String description, Charset charset) throws IOException { final StringBuilder fullContent = new StringBuilder(); // User message if (!Strings.isEmpty(description)) { fullContent.append(description); fullContent.append(Messages.SubmitEclipseL...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "String", "buildContent", "(", "String", "description", ",", "Charset", "charset", ")", "throws", "IOException", "{", "final", "StringBuilder", "fullContent", "=", "new", "StringBuilder", "(", ")",...
Build the issue content. @param description the description of the issue. @param charset the charset to use. @return the content. @throws IOException if the content cannot be built.
[ "Build", "the", "issue", "content", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/SubmitEclipseLogWizard.java#L309-L353
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.setSpaceService
@Inject public void setSpaceService(ContextSpaceService service) { if (this.spaceService != null) { this.spaceService.removeSpaceRepositoryListener(this.serviceListener); } this.spaceService = service; if (this.spaceService != null) { this.spaceService.addSpaceRepositoryListener(this...
java
@Inject public void setSpaceService(ContextSpaceService service) { if (this.spaceService != null) { this.spaceService.removeSpaceRepositoryListener(this.serviceListener); } this.spaceService = service; if (this.spaceService != null) { this.spaceService.addSpaceRepositoryListener(this...
[ "@", "Inject", "public", "void", "setSpaceService", "(", "ContextSpaceService", "service", ")", "{", "if", "(", "this", ".", "spaceService", "!=", "null", ")", "{", "this", ".", "spaceService", ".", "removeSpaceRepositoryListener", "(", "this", ".", "serviceList...
Set the reference to the space service. @param service the service.
[ "Set", "the", "reference", "to", "the", "space", "service", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L135-L144
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.firePeerConnected
protected void firePeerConnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkServic...
java
protected void firePeerConnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkServic...
[ "protected", "void", "firePeerConnected", "(", "URI", "peerURI", ",", "SpaceID", "space", ")", "{", "final", "NetworkServiceListener", "[", "]", "ilisteners", ";", "synchronized", "(", "this", ".", "listeners", ")", "{", "ilisteners", "=", "new", "NetworkService...
Notifies that a peer space was connected. @param peerURI - the URI of the peer that was connected to. @param space - the identifier of the connected space.
[ "Notifies", "that", "a", "peer", "space", "was", "connected", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L185-L194
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.firePeerDisconnected
protected void firePeerDisconnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkSer...
java
protected void firePeerDisconnected(URI peerURI, SpaceID space) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkSer...
[ "protected", "void", "firePeerDisconnected", "(", "URI", "peerURI", ",", "SpaceID", "space", ")", "{", "final", "NetworkServiceListener", "[", "]", "ilisteners", ";", "synchronized", "(", "this", ".", "listeners", ")", "{", "ilisteners", "=", "new", "NetworkServ...
Notifies that a peer space was disconnected. @param peerURI - the URI of the peer that was disconnected to. @param space - the identifier of the disconnected space.
[ "Notifies", "that", "a", "peer", "space", "was", "disconnected", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L204-L213
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.firePeerDiscovered
protected void firePeerDiscovered(URI peerURI) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkServiceListener list...
java
protected void firePeerDiscovered(URI peerURI) { final NetworkServiceListener[] ilisteners; synchronized (this.listeners) { ilisteners = new NetworkServiceListener[this.listeners.size()]; this.listeners.toArray(ilisteners); } for (final NetworkServiceListener list...
[ "protected", "void", "firePeerDiscovered", "(", "URI", "peerURI", ")", "{", "final", "NetworkServiceListener", "[", "]", "ilisteners", ";", "synchronized", "(", "this", ".", "listeners", ")", "{", "ilisteners", "=", "new", "NetworkServiceListener", "[", "this", ...
Notifies that a peer was discovered. @param peerURI - the URI of the remote kernel that was disconnected to.
[ "Notifies", "that", "a", "peer", "was", "discovered", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L238-L247
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.extractEnvelope
private static EventEnvelope extractEnvelope(Socket socket) throws IOException { // To-Do: Read the ZeroMQ socket via a NIO wrapper to support large data: // indeed the arrays has a maximal size bounded by a native int value, and // the real data could be larger than this limit. byte[] ...
java
private static EventEnvelope extractEnvelope(Socket socket) throws IOException { // To-Do: Read the ZeroMQ socket via a NIO wrapper to support large data: // indeed the arrays has a maximal size bounded by a native int value, and // the real data could be larger than this limit. byte[] ...
[ "private", "static", "EventEnvelope", "extractEnvelope", "(", "Socket", "socket", ")", "throws", "IOException", "{", "// To-Do: Read the ZeroMQ socket via a NIO wrapper to support large data:", "// indeed the arrays has a maximal size bounded by a native int value, and", "// the real data ...
Receive data from the network. @param socket - network reader. @return the envelope received over the network. @throws IOException if the envelope cannot be read from the network.
[ "Receive", "data", "from", "the", "network", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L319-L352
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java
ZeroMQNetworkService.receive
protected synchronized void receive(EventEnvelope env) throws Exception { this.logger.getKernelLogger().fine(MessageFormat.format(Messages.ZeroMQNetworkService_8, this.validatedURI, env)); final EventDispatch dispatch = this.serializer.deserialize(env); this.logger.getKernelLogger().fine(Message...
java
protected synchronized void receive(EventEnvelope env) throws Exception { this.logger.getKernelLogger().fine(MessageFormat.format(Messages.ZeroMQNetworkService_8, this.validatedURI, env)); final EventDispatch dispatch = this.serializer.deserialize(env); this.logger.getKernelLogger().fine(Message...
[ "protected", "synchronized", "void", "receive", "(", "EventEnvelope", "env", ")", "throws", "Exception", "{", "this", ".", "logger", ".", "getKernelLogger", "(", ")", ".", "fine", "(", "MessageFormat", ".", "format", "(", "Messages", ".", "ZeroMQNetworkService_8...
Extract data from a received envelope, and forwad it to the rest of the platform. @param env - the evenlope received over the network, and that must be deserialize. @throws Exception - if cannot deserialize the envelope.
[ "Extract", "data", "from", "a", "received", "envelope", "and", "forwad", "it", "to", "the", "rest", "of", "the", "platform", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/zeromq/ZeroMQNetworkService.java#L415-L427
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java
GenerationContext.getGeneratorConfig
public GeneratorConfig getGeneratorConfig() { if (this.generatorConfig == null) { this.generatorConfig = this.generatorConfigProvider.get( EcoreUtil.getRootContainer(this.contextObject)); } return this.generatorConfig; }
java
public GeneratorConfig getGeneratorConfig() { if (this.generatorConfig == null) { this.generatorConfig = this.generatorConfigProvider.get( EcoreUtil.getRootContainer(this.contextObject)); } return this.generatorConfig; }
[ "public", "GeneratorConfig", "getGeneratorConfig", "(", ")", "{", "if", "(", "this", ".", "generatorConfig", "==", "null", ")", "{", "this", ".", "generatorConfig", "=", "this", ".", "generatorConfigProvider", ".", "get", "(", "EcoreUtil", ".", "getRootContainer...
Replies the generator configuration. @return the configuration.
[ "Replies", "the", "generator", "configuration", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java#L192-L198
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java
GenerationContext.getGeneratorConfig2
public GeneratorConfig2 getGeneratorConfig2() { if (this.generatorConfig2 == null) { this.generatorConfig2 = this.generatorConfigProvider2.get( EcoreUtil.getRootContainer(this.contextObject)); } return this.generatorConfig2; }
java
public GeneratorConfig2 getGeneratorConfig2() { if (this.generatorConfig2 == null) { this.generatorConfig2 = this.generatorConfigProvider2.get( EcoreUtil.getRootContainer(this.contextObject)); } return this.generatorConfig2; }
[ "public", "GeneratorConfig2", "getGeneratorConfig2", "(", ")", "{", "if", "(", "this", ".", "generatorConfig2", "==", "null", ")", "{", "this", ".", "generatorConfig2", "=", "this", ".", "generatorConfigProvider2", ".", "get", "(", "EcoreUtil", ".", "getRootCont...
Replies the generator configuration v2. @return the configuration.
[ "Replies", "the", "generator", "configuration", "v2", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java#L204-L210
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java
GenerationContext.getGuardEvalationCodeFor
public Collection<Procedure1<? super ITreeAppendable>> getGuardEvalationCodeFor(SarlBehaviorUnit source) { assert source != null; final String id = source.getName().getIdentifier(); final Collection<Procedure1<? super ITreeAppendable>> evaluators; final Pair<SarlBehaviorUnit, Collection<Procedure1<? super ITree...
java
public Collection<Procedure1<? super ITreeAppendable>> getGuardEvalationCodeFor(SarlBehaviorUnit source) { assert source != null; final String id = source.getName().getIdentifier(); final Collection<Procedure1<? super ITreeAppendable>> evaluators; final Pair<SarlBehaviorUnit, Collection<Procedure1<? super ITree...
[ "public", "Collection", "<", "Procedure1", "<", "?", "super", "ITreeAppendable", ">", ">", "getGuardEvalationCodeFor", "(", "SarlBehaviorUnit", "source", ")", "{", "assert", "source", "!=", "null", ";", "final", "String", "id", "=", "source", ".", "getName", "...
Replies the guard evaluation code for the given event. @param source the source of the guard evaluation. @return the guard evaluators.
[ "Replies", "the", "guard", "evaluation", "code", "for", "the", "given", "event", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java#L226-L239
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java
GenerationContext.getPostFinalizationElements
public List<Runnable> getPostFinalizationElements() { final GenerationContext prt = getParentContext(); if (prt != null) { return prt.getPostFinalizationElements(); } return this.postFinalization; }
java
public List<Runnable> getPostFinalizationElements() { final GenerationContext prt = getParentContext(); if (prt != null) { return prt.getPostFinalizationElements(); } return this.postFinalization; }
[ "public", "List", "<", "Runnable", ">", "getPostFinalizationElements", "(", ")", "{", "final", "GenerationContext", "prt", "=", "getParentContext", "(", ")", ";", "if", "(", "prt", "!=", "null", ")", "{", "return", "prt", ".", "getPostFinalizationElements", "(...
Replies the collection of the elements that must be generated after the generation process of the current SARL element. <p>The differed generation element are the element's components that could be generated after the complete JVM type is generated. They are extended the JVM type definition with additionnal elements (...
[ "Replies", "the", "collection", "of", "the", "elements", "that", "must", "be", "generated", "after", "the", "generation", "process", "of", "the", "current", "SARL", "element", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/GenerationContext.java#L346-L352
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/GeneratorConfigProvider2.java
GeneratorConfigProvider2.install
public GeneratorConfig2 install(final ResourceSet resourceSet, GeneratorConfig2 config) { GeneratorConfigAdapter adapter = GeneratorConfigAdapter.findInEmfObject(resourceSet); if (adapter == null) { adapter = new GeneratorConfigAdapter(); } adapter.attachToEmfObject(resourceSet); return adapter.getLanguage...
java
public GeneratorConfig2 install(final ResourceSet resourceSet, GeneratorConfig2 config) { GeneratorConfigAdapter adapter = GeneratorConfigAdapter.findInEmfObject(resourceSet); if (adapter == null) { adapter = new GeneratorConfigAdapter(); } adapter.attachToEmfObject(resourceSet); return adapter.getLanguage...
[ "public", "GeneratorConfig2", "install", "(", "final", "ResourceSet", "resourceSet", ",", "GeneratorConfig2", "config", ")", "{", "GeneratorConfigAdapter", "adapter", "=", "GeneratorConfigAdapter", ".", "findInEmfObject", "(", "resourceSet", ")", ";", "if", "(", "adap...
Install the given configuration in the resource set. @param resourceSet the resource set. @param config the ne configuration. @return the configuration.
[ "Install", "the", "given", "configuration", "in", "the", "resource", "set", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/GeneratorConfigProvider2.java#L86-L93
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java
AbstractExpressionGenerator.getOperatorSymbol
protected String getOperatorSymbol(XAbstractFeatureCall call) { if (call != null) { final Resource res = call.eResource(); if (res instanceof StorageAwareResource) { final boolean isLoadedFromStorage = ((StorageAwareResource) res).isLoadedFromStorage(); if (isLoadedFromStorage) { final QualifiedNam...
java
protected String getOperatorSymbol(XAbstractFeatureCall call) { if (call != null) { final Resource res = call.eResource(); if (res instanceof StorageAwareResource) { final boolean isLoadedFromStorage = ((StorageAwareResource) res).isLoadedFromStorage(); if (isLoadedFromStorage) { final QualifiedNam...
[ "protected", "String", "getOperatorSymbol", "(", "XAbstractFeatureCall", "call", ")", "{", "if", "(", "call", "!=", "null", ")", "{", "final", "Resource", "res", "=", "call", ".", "eResource", "(", ")", ";", "if", "(", "res", "instanceof", "StorageAwareResou...
Get the string representation of an operator. @param call the call to the operator feature. @return the string representation of the operator or {@code null} if not a valid operator.
[ "Get", "the", "string", "representation", "of", "an", "operator", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java#L363-L377
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java
AbstractExpressionGenerator.getCallSimpleName
public static String getCallSimpleName(XAbstractFeatureCall featureCall, ILogicalContainerProvider logicalContainerProvider, IdentifiableSimpleNameProvider featureNameProvider, Function0<? extends String> nullKeyword, Function0<? extends String> thisKeyword, Function0<? extends String> superKeyword, F...
java
public static String getCallSimpleName(XAbstractFeatureCall featureCall, ILogicalContainerProvider logicalContainerProvider, IdentifiableSimpleNameProvider featureNameProvider, Function0<? extends String> nullKeyword, Function0<? extends String> thisKeyword, Function0<? extends String> superKeyword, F...
[ "public", "static", "String", "getCallSimpleName", "(", "XAbstractFeatureCall", "featureCall", ",", "ILogicalContainerProvider", "logicalContainerProvider", ",", "IdentifiableSimpleNameProvider", "featureNameProvider", ",", "Function0", "<", "?", "extends", "String", ">", "nu...
Compute the simple name for the called feature. @param featureCall the feature call. @param logicalContainerProvider the provider of logicial container. @param featureNameProvider the provider of feature name. @param nullKeyword the null-equivalent keyword. @param thisKeyword the this-equivalent keyword. @param superK...
[ "Compute", "the", "simple", "name", "for", "the", "called", "feature", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java#L390-L422
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java
AbstractExpressionGenerator.buildCallReceiver
public static boolean buildCallReceiver(XAbstractFeatureCall call, Function0<? extends String> thisKeyword, Function1<? super XExpression, ? extends String> referenceNameDefinition, List<Object> output) { if (call.isStatic()) { if (call instanceof XMemberFeatureCall) { final XMemberFeatureCall memberFeature...
java
public static boolean buildCallReceiver(XAbstractFeatureCall call, Function0<? extends String> thisKeyword, Function1<? super XExpression, ? extends String> referenceNameDefinition, List<Object> output) { if (call.isStatic()) { if (call instanceof XMemberFeatureCall) { final XMemberFeatureCall memberFeature...
[ "public", "static", "boolean", "buildCallReceiver", "(", "XAbstractFeatureCall", "call", ",", "Function0", "<", "?", "extends", "String", ">", "thisKeyword", ",", "Function1", "<", "?", "super", "XExpression", ",", "?", "extends", "String", ">", "referenceNameDefi...
Compute the list of object that serve as the receiver for the given call. @param call the feature call to analyze. @param output the objects that constitute the call's receiver. @param thisKeyword the "this" keyword. @param referenceNameDefinition replies the name of the expression, if defined. @return {@code true} if...
[ "Compute", "the", "list", "of", "object", "that", "serve", "as", "the", "receiver", "for", "the", "given", "call", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExpressionGenerator.java#L432-L473
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java
BootModule.getContextID
@Provides @Named(JanusConfig.DEFAULT_CONTEXT_ID_NAME) public static UUID getContextID() { String str = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_CONTEXT_ID_NAME); if (Strings.isNullOrEmpty(str)) { Boolean v; // From boot agent type str = JanusConfig.g...
java
@Provides @Named(JanusConfig.DEFAULT_CONTEXT_ID_NAME) public static UUID getContextID() { String str = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_CONTEXT_ID_NAME); if (Strings.isNullOrEmpty(str)) { Boolean v; // From boot agent type str = JanusConfig.g...
[ "@", "Provides", "@", "Named", "(", "JanusConfig", ".", "DEFAULT_CONTEXT_ID_NAME", ")", "public", "static", "UUID", "getContextID", "(", ")", "{", "String", "str", "=", "JanusConfig", ".", "getSystemProperty", "(", "JanusConfig", ".", "DEFAULT_CONTEXT_ID_NAME", ")...
Create a context identifier. @return the contextID
[ "Create", "a", "context", "identifier", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java#L78-L116
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java
BootModule.getSpaceID
@Provides @Named(JanusConfig.DEFAULT_SPACE_ID_NAME) public static UUID getSpaceID() { final String v = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_SPACE_ID_NAME, JanusConfig.DEFAULT_SPACE_ID_VALUE); return UUID.fromString(v); }
java
@Provides @Named(JanusConfig.DEFAULT_SPACE_ID_NAME) public static UUID getSpaceID() { final String v = JanusConfig.getSystemProperty(JanusConfig.DEFAULT_SPACE_ID_NAME, JanusConfig.DEFAULT_SPACE_ID_VALUE); return UUID.fromString(v); }
[ "@", "Provides", "@", "Named", "(", "JanusConfig", ".", "DEFAULT_SPACE_ID_NAME", ")", "public", "static", "UUID", "getSpaceID", "(", ")", "{", "final", "String", "v", "=", "JanusConfig", ".", "getSystemProperty", "(", "JanusConfig", ".", "DEFAULT_SPACE_ID_NAME", ...
Construct a space identifier. @return the spaceID
[ "Construct", "a", "space", "identifier", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java#L123-L128
train
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java
BootModule.getPUBURIAsString
private static String getPUBURIAsString() { String pubUri = JanusConfig.getSystemProperty(JanusConfig.PUB_URI); if (pubUri == null || pubUri.isEmpty()) { InetAddress a = NetworkUtil.getPrimaryAddress(); if (a == null) { a = NetworkUtil.getLoopbackAddress(); ...
java
private static String getPUBURIAsString() { String pubUri = JanusConfig.getSystemProperty(JanusConfig.PUB_URI); if (pubUri == null || pubUri.isEmpty()) { InetAddress a = NetworkUtil.getPrimaryAddress(); if (a == null) { a = NetworkUtil.getLoopbackAddress(); ...
[ "private", "static", "String", "getPUBURIAsString", "(", ")", "{", "String", "pubUri", "=", "JanusConfig", ".", "getSystemProperty", "(", "JanusConfig", ".", "PUB_URI", ")", ";", "if", "(", "pubUri", "==", "null", "||", "pubUri", ".", "isEmpty", "(", ")", ...
Extract the current value of the PUB_URI from the system's property or form the platform default value. @return the current PUB_URI
[ "Extract", "the", "current", "value", "of", "the", "PUB_URI", "from", "the", "system", "s", "property", "or", "form", "the", "platform", "default", "value", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/modules/BootModule.java#L151-L164
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.populateInterfaceElements
public static void populateInterfaceElements( JvmDeclaredType jvmElement, Map<ActionPrototype, JvmOperation> operations, Map<String, JvmField> fields, IActionPrototypeProvider sarlSignatureProvider) { for (final JvmFeature feature : jvmElement.getAllFeatures()) { if (!"java.lang.Object".equals(feature....
java
public static void populateInterfaceElements( JvmDeclaredType jvmElement, Map<ActionPrototype, JvmOperation> operations, Map<String, JvmField> fields, IActionPrototypeProvider sarlSignatureProvider) { for (final JvmFeature feature : jvmElement.getAllFeatures()) { if (!"java.lang.Object".equals(feature....
[ "public", "static", "void", "populateInterfaceElements", "(", "JvmDeclaredType", "jvmElement", ",", "Map", "<", "ActionPrototype", ",", "JvmOperation", ">", "operations", ",", "Map", "<", "String", ",", "JvmField", ">", "fields", ",", "IActionPrototypeProvider", "sa...
Analyzing the type hierarchy of the given interface and extract hierarchy information. @param jvmElement - the element to analyze @param operations - filled with the operations inside and inherited by the element. @param fields - filled with the fields inside and inherited by the element. @param sarlSignatureProvider ...
[ "Analyzing", "the", "type", "hierarchy", "of", "the", "given", "interface", "and", "extract", "hierarchy", "information", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L184-L203
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isVarArg
public static boolean isVarArg(List<? extends XtendParameter> params) { assert params != null; if (params.size() > 0) { final XtendParameter param = params.get(params.size() - 1); assert param != null; return param.isVarArg(); } return false; }
java
public static boolean isVarArg(List<? extends XtendParameter> params) { assert params != null; if (params.size() > 0) { final XtendParameter param = params.get(params.size() - 1); assert param != null; return param.isVarArg(); } return false; }
[ "public", "static", "boolean", "isVarArg", "(", "List", "<", "?", "extends", "XtendParameter", ">", "params", ")", "{", "assert", "params", "!=", "null", ";", "if", "(", "params", ".", "size", "(", ")", ">", "0", ")", "{", "final", "XtendParameter", "p...
Replies if the last parameter is a variadic parameter. @param params - parameters. @return <code>true</code> if the late parameter is variadic.
[ "Replies", "if", "the", "last", "parameter", "is", "a", "variadic", "parameter", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L363-L371
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.createNameForHiddenCapacityImplementationAttribute
public static String createNameForHiddenCapacityImplementationAttribute(String id) { return PREFIX_CAPACITY_IMPLEMENTATION + fixHiddenMember(id.toUpperCase()).replace(".", //$NON-NLS-1$ HIDDEN_MEMBER_REPLACEMENT_CHARACTER); }
java
public static String createNameForHiddenCapacityImplementationAttribute(String id) { return PREFIX_CAPACITY_IMPLEMENTATION + fixHiddenMember(id.toUpperCase()).replace(".", //$NON-NLS-1$ HIDDEN_MEMBER_REPLACEMENT_CHARACTER); }
[ "public", "static", "String", "createNameForHiddenCapacityImplementationAttribute", "(", "String", "id", ")", "{", "return", "PREFIX_CAPACITY_IMPLEMENTATION", "+", "fixHiddenMember", "(", "id", ".", "toUpperCase", "(", ")", ")", ".", "replace", "(", "\".\"", ",", "/...
Create the name of the hidden field that is containing a capacity implementation. @param id the id of the capacity. @return the field name.
[ "Create", "the", "name", "of", "the", "hidden", "field", "that", "is", "containing", "a", "capacity", "implementation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L414-L417
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isNameForHiddenCapacityImplementationCallingMethod
public static boolean isNameForHiddenCapacityImplementationCallingMethod(String simpleName) { return simpleName != null && simpleName.startsWith(PREFIX_CAPACITY_IMPLEMENTATION) && simpleName.endsWith(POSTFIX_CAPACITY_IMPLEMENTATION_CALLER); }
java
public static boolean isNameForHiddenCapacityImplementationCallingMethod(String simpleName) { return simpleName != null && simpleName.startsWith(PREFIX_CAPACITY_IMPLEMENTATION) && simpleName.endsWith(POSTFIX_CAPACITY_IMPLEMENTATION_CALLER); }
[ "public", "static", "boolean", "isNameForHiddenCapacityImplementationCallingMethod", "(", "String", "simpleName", ")", "{", "return", "simpleName", "!=", "null", "&&", "simpleName", ".", "startsWith", "(", "PREFIX_CAPACITY_IMPLEMENTATION", ")", "&&", "simpleName", ".", ...
Replies if the given simple name is the name of the hidden method that is calling a capacity implementation. @param simpleName the simple name. @return <code>true</code> if the given simple name if for the hidden method for capacuty uses.
[ "Replies", "if", "the", "given", "simple", "name", "is", "the", "name", "of", "the", "hidden", "method", "that", "is", "calling", "a", "capacity", "implementation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L434-L437
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.createNameForHiddenGuardEvaluatorMethod
public static String createNameForHiddenGuardEvaluatorMethod(String eventId, int handlerIndex) { return PREFIX_GUARD + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex; }
java
public static String createNameForHiddenGuardEvaluatorMethod(String eventId, int handlerIndex) { return PREFIX_GUARD + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex; }
[ "public", "static", "String", "createNameForHiddenGuardEvaluatorMethod", "(", "String", "eventId", ",", "int", "handlerIndex", ")", "{", "return", "PREFIX_GUARD", "+", "fixHiddenMember", "(", "eventId", ")", "+", "HIDDEN_MEMBER_CHARACTER", "+", "handlerIndex", ";", "}...
Create the name of the hidden method that is containing the event guard evaluation. @param eventId the id of the event. @param handlerIndex the index of the handler in the container type. @return the method name.
[ "Create", "the", "name", "of", "the", "hidden", "method", "that", "is", "containing", "the", "event", "guard", "evaluation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L463-L466
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.createNameForHiddenEventHandlerMethod
public static String createNameForHiddenEventHandlerMethod(String eventId, int handlerIndex) { return PREFIX_EVENT_HANDLER + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex; }
java
public static String createNameForHiddenEventHandlerMethod(String eventId, int handlerIndex) { return PREFIX_EVENT_HANDLER + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex; }
[ "public", "static", "String", "createNameForHiddenEventHandlerMethod", "(", "String", "eventId", ",", "int", "handlerIndex", ")", "{", "return", "PREFIX_EVENT_HANDLER", "+", "fixHiddenMember", "(", "eventId", ")", "+", "HIDDEN_MEMBER_CHARACTER", "+", "handlerIndex", ";"...
Create the name of the hidden method that is containing the event handler code. @param eventId the id of the event. @param handlerIndex the index of the handler in the container type. @return the attribute name.
[ "Create", "the", "name", "of", "the", "hidden", "method", "that", "is", "containing", "the", "event", "handler", "code", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L474-L476
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isClass
public static boolean isClass(LightweightTypeReference typeRef) { final JvmType t = typeRef.getType(); if (t instanceof JvmGenericType) { return !((JvmGenericType) t).isInterface(); } return false; }
java
public static boolean isClass(LightweightTypeReference typeRef) { final JvmType t = typeRef.getType(); if (t instanceof JvmGenericType) { return !((JvmGenericType) t).isInterface(); } return false; }
[ "public", "static", "boolean", "isClass", "(", "LightweightTypeReference", "typeRef", ")", "{", "final", "JvmType", "t", "=", "typeRef", ".", "getType", "(", ")", ";", "if", "(", "t", "instanceof", "JvmGenericType", ")", "{", "return", "!", "(", "(", "JvmG...
Replies if the given reference is pointing to a class type. @param typeRef - the type reference to test. @return <code>true</code> if the pointed element is a class type.
[ "Replies", "if", "the", "given", "reference", "is", "pointing", "to", "a", "class", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L483-L489
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isFinal
public static boolean isFinal(LightweightTypeReference expressionTypeRef) { if (expressionTypeRef.isArray()) { return isFinal(expressionTypeRef.getComponentType()); } if (expressionTypeRef.isPrimitive()) { return true; } return expressionTypeRef.getType() instanceof JvmDeclaredType && ((JvmDeclaredT...
java
public static boolean isFinal(LightweightTypeReference expressionTypeRef) { if (expressionTypeRef.isArray()) { return isFinal(expressionTypeRef.getComponentType()); } if (expressionTypeRef.isPrimitive()) { return true; } return expressionTypeRef.getType() instanceof JvmDeclaredType && ((JvmDeclaredT...
[ "public", "static", "boolean", "isFinal", "(", "LightweightTypeReference", "expressionTypeRef", ")", "{", "if", "(", "expressionTypeRef", ".", "isArray", "(", ")", ")", "{", "return", "isFinal", "(", "expressionTypeRef", ".", "getComponentType", "(", ")", ")", "...
Replies if the given reference is referencing a final type. @param expressionTypeRef - the type reference to test. @return <code>true</code> if the given type is final.
[ "Replies", "if", "the", "given", "reference", "is", "referencing", "a", "final", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L505-L514
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isFinal
public static boolean isFinal(Class<?> expressionType) { if (expressionType.isArray()) { return isFinal(expressionType.getComponentType()); } if (expressionType.isPrimitive()) { return true; } return expressionType.isEnum() || Modifier.isFinal(expressionType.getModifiers()); }
java
public static boolean isFinal(Class<?> expressionType) { if (expressionType.isArray()) { return isFinal(expressionType.getComponentType()); } if (expressionType.isPrimitive()) { return true; } return expressionType.isEnum() || Modifier.isFinal(expressionType.getModifiers()); }
[ "public", "static", "boolean", "isFinal", "(", "Class", "<", "?", ">", "expressionType", ")", "{", "if", "(", "expressionType", ".", "isArray", "(", ")", ")", "{", "return", "isFinal", "(", "expressionType", ".", "getComponentType", "(", ")", ")", ";", "...
Replies if the given type is a final type. @param expressionType - the type to test. @return <code>true</code> if the given type is final.
[ "Replies", "if", "the", "given", "type", "is", "a", "final", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L521-L530
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isInterface
public static boolean isInterface(LightweightTypeReference type) { return type.getType() instanceof JvmGenericType && ((JvmGenericType) type.getType()).isInterface(); }
java
public static boolean isInterface(LightweightTypeReference type) { return type.getType() instanceof JvmGenericType && ((JvmGenericType) type.getType()).isInterface(); }
[ "public", "static", "boolean", "isInterface", "(", "LightweightTypeReference", "type", ")", "{", "return", "type", ".", "getType", "(", ")", "instanceof", "JvmGenericType", "&&", "(", "(", "JvmGenericType", ")", "type", ".", "getType", "(", ")", ")", ".", "i...
Replies if the given type is an interface. @param type - the type to test. @return <code>true</code> if the given type is an interface.
[ "Replies", "if", "the", "given", "type", "is", "an", "interface", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L537-L540
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.canCast
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:booleanexpressioncomplexity"}) public static boolean canCast( LightweightTypeReference fromType, LightweightTypeReference toType, boolean enablePrimitiveWidening, boolean enableVoidMatchingNull, boolean allowSynonyms) { if (enableVoidMatching...
java
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:booleanexpressioncomplexity"}) public static boolean canCast( LightweightTypeReference fromType, LightweightTypeReference toType, boolean enablePrimitiveWidening, boolean enableVoidMatchingNull, boolean allowSynonyms) { if (enableVoidMatching...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:cyclomaticcomplexity\"", ",", "\"checkstyle:booleanexpressioncomplexity\"", "}", ")", "public", "static", "boolean", "canCast", "(", "LightweightTypeReference", "fromType", ",", "LightweightTypeReference", "toType", ",", "boole...
Replies if it is allowed to cast between the given types. @param fromType - source type @param toType - target type @param enablePrimitiveWidening - indicates if the widening of the primitive types is allowed. @param enableVoidMatchingNull - indicates if the <code>null</code> is matching <code>void</code>. @param allo...
[ "Replies", "if", "it", "is", "allowed", "to", "cast", "between", "the", "given", "types", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L551-L587
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.toLightweightTypeReference
public static LightweightTypeReference toLightweightTypeReference( JvmType type, CommonTypeComputationServices services, boolean keepUnboundWildcardInformation) { if (type == null) { return null; } final StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type); final Lightweigh...
java
public static LightweightTypeReference toLightweightTypeReference( JvmType type, CommonTypeComputationServices services, boolean keepUnboundWildcardInformation) { if (type == null) { return null; } final StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type); final Lightweigh...
[ "public", "static", "LightweightTypeReference", "toLightweightTypeReference", "(", "JvmType", "type", ",", "CommonTypeComputationServices", "services", ",", "boolean", "keepUnboundWildcardInformation", ")", "{", "if", "(", "type", "==", "null", ")", "{", "return", "null...
Convert a type to a lightweight type reference. @param type - type to convert. @param services - services used for the conversion @param keepUnboundWildcardInformation - indicates if the unbound wild card information must be keeped in the lightweight reference. @return the lightweight type reference.
[ "Convert", "a", "type", "to", "a", "lightweight", "type", "reference", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L641-L652
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.compareVersions
public static int compareVersions(String v1, String v2) { // Remove the SNAPSHOT version. //final String fixedv1 = v1.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$ //final String fixedv2 = v2.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$ //final Version vobject1 = Version.parseVersio...
java
public static int compareVersions(String v1, String v2) { // Remove the SNAPSHOT version. //final String fixedv1 = v1.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$ //final String fixedv2 = v2.replaceFirst("-SNAPSHOT$", ""); //$NON-NLS-1$ //$NON-NLS-2$ //final Version vobject1 = Version.parseVersio...
[ "public", "static", "int", "compareVersions", "(", "String", "v1", ",", "String", "v2", ")", "{", "// Remove the SNAPSHOT version.", "//final String fixedv1 = v1.replaceFirst(\"-SNAPSHOT$\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$", "//final String fixedv2 = v2.replaceFirst(\"-SNAPSHOT$\", \"...
Compare the two strings as they are version numbers. @param v1 - first version to compare. @param v2 - second version to compare. @return Negative integer of <code>v1</code> is lower than <code>v2</code>; positive integer of <code>v1</code> is greater than <code>v2</code>; {@code 0} if they are strictly equal.
[ "Compare", "the", "two", "strings", "as", "they", "are", "version", "numbers", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L662-L671
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.getSarlCodeFor
public static String getSarlCodeFor(EObject object) { final ICompositeNode node = NodeModelUtils.getNode(object); if (node != null) { String text = node.getText(); if (text != null) { text = text.trim(); text = text.replaceAll("[\n\r\f]+", " "); //$NON-NLS-1$//$NON-NLS-2$ } return Strings.emptyT...
java
public static String getSarlCodeFor(EObject object) { final ICompositeNode node = NodeModelUtils.getNode(object); if (node != null) { String text = node.getText(); if (text != null) { text = text.trim(); text = text.replaceAll("[\n\r\f]+", " "); //$NON-NLS-1$//$NON-NLS-2$ } return Strings.emptyT...
[ "public", "static", "String", "getSarlCodeFor", "(", "EObject", "object", ")", "{", "final", "ICompositeNode", "node", "=", "NodeModelUtils", ".", "getNode", "(", "object", ")", ";", "if", "(", "node", "!=", "null", ")", "{", "String", "text", "=", "node",...
Replies the original code for the given Ecore object. <p>The replied code is the SARL code within the source file. It's format depends on how the developer has input it. <p>This function does:<ul> <li>replace any sequence of "new line" characters by a space character, and</li> <li>trim the whitespaces.</li> </ul> @p...
[ "Replies", "the", "original", "code", "for", "the", "given", "Ecore", "object", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L712-L723
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.hasAbstractMember
public static boolean hasAbstractMember(XtendTypeDeclaration declaration) { if (declaration != null) { for (final XtendMember member : declaration.getMembers()) { if (member instanceof XtendFunction) { if (((XtendFunction) member).isAbstract()) { return true; } } } } return false; }
java
public static boolean hasAbstractMember(XtendTypeDeclaration declaration) { if (declaration != null) { for (final XtendMember member : declaration.getMembers()) { if (member instanceof XtendFunction) { if (((XtendFunction) member).isAbstract()) { return true; } } } } return false; }
[ "public", "static", "boolean", "hasAbstractMember", "(", "XtendTypeDeclaration", "declaration", ")", "{", "if", "(", "declaration", "!=", "null", ")", "{", "for", "(", "final", "XtendMember", "member", ":", "declaration", ".", "getMembers", "(", ")", ")", "{",...
Replies if the given declaration has an abstract member. @param declaration - the declaration. @return <code>true</code> if the given type has an abstract function.
[ "Replies", "if", "the", "given", "declaration", "has", "an", "abstract", "member", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1027-L1038
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isCompatibleSARLLibraryOnClasspath
public static boolean isCompatibleSARLLibraryOnClasspath(TypeReferences typeReferences, Notifier context) { final OutParameter<String> version = new OutParameter<>(); final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath(typeReferences, context, version); if (code == SarlLibraryErrorCode.SARL_FOUND) ...
java
public static boolean isCompatibleSARLLibraryOnClasspath(TypeReferences typeReferences, Notifier context) { final OutParameter<String> version = new OutParameter<>(); final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath(typeReferences, context, version); if (code == SarlLibraryErrorCode.SARL_FOUND) ...
[ "public", "static", "boolean", "isCompatibleSARLLibraryOnClasspath", "(", "TypeReferences", "typeReferences", ",", "Notifier", "context", ")", "{", "final", "OutParameter", "<", "String", ">", "version", "=", "new", "OutParameter", "<>", "(", ")", ";", "final", "S...
Check if a compatible SARL library is available on the classpath. @param typeReferences - the accessor to the types. @param context - the context that is providing the access to the classpath. @return <code>true</code> if a compatible SARL library was found. Otherwise <code>false</code>.
[ "Check", "if", "a", "compatible", "SARL", "library", "is", "available", "on", "the", "classpath", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1047-L1054
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isCompatibleSARLLibraryVersion
public static boolean isCompatibleSARLLibraryVersion(String version) { if (version != null) { final Version currentVersion = Version.parseVersion(SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING); final Version paramVersion = Version.parseVersion(version); return currentVersion.getMajor() == paramVersion.get...
java
public static boolean isCompatibleSARLLibraryVersion(String version) { if (version != null) { final Version currentVersion = Version.parseVersion(SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING); final Version paramVersion = Version.parseVersion(version); return currentVersion.getMajor() == paramVersion.get...
[ "public", "static", "boolean", "isCompatibleSARLLibraryVersion", "(", "String", "version", ")", "{", "if", "(", "version", "!=", "null", ")", "{", "final", "Version", "currentVersion", "=", "Version", ".", "parseVersion", "(", "SARLVersion", ".", "SPECIFICATION_RE...
Check if a version is compatible with the expected SARL library. @param version - the version to test. @return <code>true</code> if a compatible SARL library was found. Otherwise <code>false</code>.
[ "Check", "if", "a", "version", "is", "compatible", "with", "the", "expected", "SARL", "library", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1062-L1070
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isCompatibleJREVersion
public static boolean isCompatibleJREVersion(String version) { if (version != null && !version.isEmpty()) { final Version current = Version.parseVersion(version); if (current != null) { final Version minJdk = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION); assert minJdk != null; if (current.c...
java
public static boolean isCompatibleJREVersion(String version) { if (version != null && !version.isEmpty()) { final Version current = Version.parseVersion(version); if (current != null) { final Version minJdk = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION); assert minJdk != null; if (current.c...
[ "public", "static", "boolean", "isCompatibleJREVersion", "(", "String", "version", ")", "{", "if", "(", "version", "!=", "null", "&&", "!", "version", ".", "isEmpty", "(", ")", ")", "{", "final", "Version", "current", "=", "Version", ".", "parseVersion", "...
Check if a version of the JRE is compatible with the SARL library. @param version - the version to test. @return <code>true</code> if this version is for a compatible JRE. Otherwise <code>false</code>.
[ "Check", "if", "a", "version", "of", "the", "JRE", "is", "compatible", "with", "the", "SARL", "library", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1078-L1092
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isCompatibleXtextVersion
public static boolean isCompatibleXtextVersion(String version) { return version != null && !version.isEmpty() && compareVersions(version, SARLVersion.MINIMAL_XTEXT_VERSION) >= 0; }
java
public static boolean isCompatibleXtextVersion(String version) { return version != null && !version.isEmpty() && compareVersions(version, SARLVersion.MINIMAL_XTEXT_VERSION) >= 0; }
[ "public", "static", "boolean", "isCompatibleXtextVersion", "(", "String", "version", ")", "{", "return", "version", "!=", "null", "&&", "!", "version", ".", "isEmpty", "(", ")", "&&", "compareVersions", "(", "version", ",", "SARLVersion", ".", "MINIMAL_XTEXT_VER...
Check if a version of Xtext is compatible with the SARL library. @param version - the version to test. @return <code>true</code> if this version is for a compatible Xtext. Otherwise <code>false</code>.
[ "Check", "if", "a", "version", "of", "Xtext", "is", "compatible", "with", "the", "SARL", "library", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1109-L1112
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isCompatibleXtextVersion
public static boolean isCompatibleXtextVersion() { final XtextVersion xtextVersion = XtextVersion.getCurrent(); if (xtextVersion != null && !Strings.isNullOrEmpty(xtextVersion.getVersion())) { return isCompatibleXtextVersion(xtextVersion.getVersion()); } return false; }
java
public static boolean isCompatibleXtextVersion() { final XtextVersion xtextVersion = XtextVersion.getCurrent(); if (xtextVersion != null && !Strings.isNullOrEmpty(xtextVersion.getVersion())) { return isCompatibleXtextVersion(xtextVersion.getVersion()); } return false; }
[ "public", "static", "boolean", "isCompatibleXtextVersion", "(", ")", "{", "final", "XtextVersion", "xtextVersion", "=", "XtextVersion", ".", "getCurrent", "(", ")", ";", "if", "(", "xtextVersion", "!=", "null", "&&", "!", "Strings", ".", "isNullOrEmpty", "(", ...
Check if a version of the current Xtext is compatible with the SARL library. @return <code>true</code> if this version is for a compatible Xtext. Otherwise <code>false</code>.
[ "Check", "if", "a", "version", "of", "the", "current", "Xtext", "is", "compatible", "with", "the", "SARL", "library", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1119-L1125
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isSARLAnnotation
public static boolean isSARLAnnotation(Class<?> type) { return (type != null && Annotation.class.isAssignableFrom(type)) && isSARLAnnotation(type.getPackage().getName()); }
java
public static boolean isSARLAnnotation(Class<?> type) { return (type != null && Annotation.class.isAssignableFrom(type)) && isSARLAnnotation(type.getPackage().getName()); }
[ "public", "static", "boolean", "isSARLAnnotation", "(", "Class", "<", "?", ">", "type", ")", "{", "return", "(", "type", "!=", "null", "&&", "Annotation", ".", "class", ".", "isAssignableFrom", "(", "type", ")", ")", "&&", "isSARLAnnotation", "(", "type", ...
Replies if the given annotation is an annotation from the SARL core library. @param type the type of the annotation @return <code>true</code> if the given type is a SARL annotation.
[ "Replies", "if", "the", "given", "annotation", "is", "an", "annotation", "from", "the", "SARL", "core", "library", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1206-L1209
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isFunctionalInterface
public static boolean isFunctionalInterface(JvmGenericType type, IActionPrototypeProvider sarlSignatureProvider) { if (type != null && type.isInterface()) { final Map<ActionPrototype, JvmOperation> operations = new HashMap<>(); populateInterfaceElements(type, operations, null, sarlSignatureProvider); if (ope...
java
public static boolean isFunctionalInterface(JvmGenericType type, IActionPrototypeProvider sarlSignatureProvider) { if (type != null && type.isInterface()) { final Map<ActionPrototype, JvmOperation> operations = new HashMap<>(); populateInterfaceElements(type, operations, null, sarlSignatureProvider); if (ope...
[ "public", "static", "boolean", "isFunctionalInterface", "(", "JvmGenericType", "type", ",", "IActionPrototypeProvider", "sarlSignatureProvider", ")", "{", "if", "(", "type", "!=", "null", "&&", "type", ".", "isInterface", "(", ")", ")", "{", "final", "Map", "<",...
Replies if the given type is a functional interface. <p>This function does not test if the {@code @FunctionalInterface} is attached to the type. The function counts the number of operations. @param type the type to test. @param sarlSignatureProvider the provider of SARL operation signatures. @return <code>true</code>...
[ "Replies", "if", "the", "given", "type", "is", "a", "functional", "interface", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1229-L1239
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.dump
@SuppressWarnings("checkstyle:npathcomplexity") public static String dump(Object object, boolean includeStaticField) { if (object == null) { return new String(); } final StringBuilder buffer = new StringBuilder(); final LinkedList<Class<?>> types = new LinkedList<>(); types.add(object.getClass()); while...
java
@SuppressWarnings("checkstyle:npathcomplexity") public static String dump(Object object, boolean includeStaticField) { if (object == null) { return new String(); } final StringBuilder buffer = new StringBuilder(); final LinkedList<Class<?>> types = new LinkedList<>(); types.add(object.getClass()); while...
[ "@", "SuppressWarnings", "(", "\"checkstyle:npathcomplexity\"", ")", "public", "static", "String", "dump", "(", "Object", "object", ",", "boolean", "includeStaticField", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "new", "String", "(", ")"...
Dump the object. @param object the object. @param includeStaticField indicates if the static fields should be included. @return the string representation of the object. @since 0.6
[ "Dump", "the", "object", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1385-L1438
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.cloneWithTypeParametersAndProxies
public static JvmTypeReference cloneWithTypeParametersAndProxies( JvmTypeReference type, Iterable<JvmTypeParameter> executableTypeParameters, Map<String, JvmTypeReference> superTypeParameterMapping, JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder, TypeReferences typeReferences, ...
java
public static JvmTypeReference cloneWithTypeParametersAndProxies( JvmTypeReference type, Iterable<JvmTypeParameter> executableTypeParameters, Map<String, JvmTypeReference> superTypeParameterMapping, JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder, TypeReferences typeReferences, ...
[ "public", "static", "JvmTypeReference", "cloneWithTypeParametersAndProxies", "(", "JvmTypeReference", "type", ",", "Iterable", "<", "JvmTypeParameter", ">", "executableTypeParameters", ",", "Map", "<", "String", ",", "JvmTypeReference", ">", "superTypeParameterMapping", ","...
Clone the given type reference that for being link to the given operation. <p>The proxies are not resolved, and the type parameters are clone when they are related to the type parameter of the type container. @param type the source type. @param executableTypeParameters the type parameters of the executable component ...
[ "Clone", "the", "given", "type", "reference", "that", "for", "being", "link", "to", "the", "given", "operation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1455-L1507
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.getSuperTypeParameterMap
public static void getSuperTypeParameterMap(JvmDeclaredType type, Map<String, JvmTypeReference> mapping) { for (final JvmTypeReference superTypeReference : type.getSuperTypes()) { if (superTypeReference instanceof JvmParameterizedTypeReference) { final JvmParameterizedTypeReference parameterizedTypeReference =...
java
public static void getSuperTypeParameterMap(JvmDeclaredType type, Map<String, JvmTypeReference> mapping) { for (final JvmTypeReference superTypeReference : type.getSuperTypes()) { if (superTypeReference instanceof JvmParameterizedTypeReference) { final JvmParameterizedTypeReference parameterizedTypeReference =...
[ "public", "static", "void", "getSuperTypeParameterMap", "(", "JvmDeclaredType", "type", ",", "Map", "<", "String", ",", "JvmTypeReference", ">", "mapping", ")", "{", "for", "(", "final", "JvmTypeReference", "superTypeReference", ":", "type", ".", "getSuperTypes", ...
Extract the mapping between the type parameters declared within the super types and the type parameters arguments that are declared within the given type. <p>For example, consider the following code: <pre><code> interface X&lt;T&gt; { def a(p1 : T, p2 : U) with U } interface Y&lt;T&gt; { } class Z&lt;TT&gt; implements...
[ "Extract", "the", "mapping", "between", "the", "type", "parameters", "declared", "within", "the", "super", "types", "and", "the", "type", "parameters", "arguments", "that", "are", "declared", "within", "the", "given", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1590-L1605
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.setStructuralFeature
public static void setStructuralFeature(EObject object, EStructuralFeature property, Object value) { assert object != null; assert property != null; if (value == null) { object.eUnset(property); } else { object.eSet(property, value); } }
java
public static void setStructuralFeature(EObject object, EStructuralFeature property, Object value) { assert object != null; assert property != null; if (value == null) { object.eUnset(property); } else { object.eSet(property, value); } }
[ "public", "static", "void", "setStructuralFeature", "(", "EObject", "object", ",", "EStructuralFeature", "property", ",", "Object", "value", ")", "{", "assert", "object", "!=", "null", ";", "assert", "property", "!=", "null", ";", "if", "(", "value", "==", "...
Set the given structure feature with the given value. @param object the object that contains the feature. @param property the feature to change. @param value the value of the feature.
[ "Set", "the", "given", "structure", "feature", "with", "the", "given", "value", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1696-L1704
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.getRootFeatureCall
public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall) { final EObject container = featureCall.eContainer(); final XAbstractFeatureCall rootFeatureCall; if (container instanceof XMemberFeatureCall || container instanceof XFeatureCall) { rootFeatureCall = (XAbstractFeatureCall) ...
java
public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall) { final EObject container = featureCall.eContainer(); final XAbstractFeatureCall rootFeatureCall; if (container instanceof XMemberFeatureCall || container instanceof XFeatureCall) { rootFeatureCall = (XAbstractFeatureCall) ...
[ "public", "static", "XAbstractFeatureCall", "getRootFeatureCall", "(", "XAbstractFeatureCall", "featureCall", ")", "{", "final", "EObject", "container", "=", "featureCall", ".", "eContainer", "(", ")", ";", "final", "XAbstractFeatureCall", "rootFeatureCall", ";", "if", ...
Replies the root feature call into a sequence of feature calls. @param featureCall the leaf feature call. @return the root feature call. @since 0.8.6 @see #getRootFeatureCall(XAbstractFeatureCall, XExpression, List)
[ "Replies", "the", "root", "feature", "call", "into", "a", "sequence", "of", "feature", "calls", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1713-L1723
train
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.getRootFeatureCall
public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall, XExpression container, List<JvmFormalParameter> containerParameters) { if (hasLocalParameters(featureCall, container, containerParameters) || !(featureCall instanceof XMemberFeatureCall || featureCall instanceof XFeatureCal...
java
public static XAbstractFeatureCall getRootFeatureCall(XAbstractFeatureCall featureCall, XExpression container, List<JvmFormalParameter> containerParameters) { if (hasLocalParameters(featureCall, container, containerParameters) || !(featureCall instanceof XMemberFeatureCall || featureCall instanceof XFeatureCal...
[ "public", "static", "XAbstractFeatureCall", "getRootFeatureCall", "(", "XAbstractFeatureCall", "featureCall", ",", "XExpression", "container", ",", "List", "<", "JvmFormalParameter", ">", "containerParameters", ")", "{", "if", "(", "hasLocalParameters", "(", "featureCall"...
Replies the root feature call into a sequence of feature calls that has not reference to elements declared within the container, and that are not one of the container's parameters. @param featureCall the leaf feature call. @param container the container of the feature call. @param containerParameters the parameters of...
[ "Replies", "the", "root", "feature", "call", "into", "a", "sequence", "of", "feature", "calls", "that", "has", "not", "reference", "to", "elements", "declared", "within", "the", "container", "and", "that", "are", "not", "one", "of", "the", "container", "s", ...
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1736-L1757
train
amzn/ion-java
src/com/amazon/ion/impl/IonWriterSystem.java
IonWriterSystem.isFieldNameSet
@Override public final boolean isFieldNameSet() { if (_field_name_type != null) { switch (_field_name_type) { case STRING: return _field_name != null; case INT: return _field_name_sid >= 0; default: break; ...
java
@Override public final boolean isFieldNameSet() { if (_field_name_type != null) { switch (_field_name_type) { case STRING: return _field_name != null; case INT: return _field_name_sid >= 0; default: break; ...
[ "@", "Override", "public", "final", "boolean", "isFieldNameSet", "(", ")", "{", "if", "(", "_field_name_type", "!=", "null", ")", "{", "switch", "(", "_field_name_type", ")", "{", "case", "STRING", ":", "return", "_field_name", "!=", "null", ";", "case", "...
not supported.
[ "not", "supported", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonWriterSystem.java#L341-L355
train
amzn/ion-java
src/com/amazon/ion/impl/LocalSymbolTable.java
LocalSymbolTable.putSymbol
int putSymbol(String symbolName) { if (isReadOnly) { throw new ReadOnlyValueException(SymbolTable.class); } if (mySymbolsCount == mySymbolNames.length) { int newlen = mySymbolsCount * 2; if (newlen < DEFAULT_CAPACITY) { ...
java
int putSymbol(String symbolName) { if (isReadOnly) { throw new ReadOnlyValueException(SymbolTable.class); } if (mySymbolsCount == mySymbolNames.length) { int newlen = mySymbolsCount * 2; if (newlen < DEFAULT_CAPACITY) { ...
[ "int", "putSymbol", "(", "String", "symbolName", ")", "{", "if", "(", "isReadOnly", ")", "{", "throw", "new", "ReadOnlyValueException", "(", "SymbolTable", ".", "class", ")", ";", "}", "if", "(", "mySymbolsCount", "==", "mySymbolNames", ".", "length", ")", ...
NOT SYNCHRONIZED! Call within constructor or from synch'd method.
[ "NOT", "SYNCHRONIZED!", "Call", "within", "constructor", "or", "from", "synch", "d", "method", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/LocalSymbolTable.java#L534-L566
train
amzn/ion-java
src/com/amazon/ion/impl/LocalSymbolTable.java
LocalSymbolTable.symtabExtends
boolean symtabExtends(SymbolTable other) { // Throws ClassCastException if other isn't a local symtab LocalSymbolTable subset = (LocalSymbolTable) other; // Gather snapshots of each LST's data, so we don't // Superset must have same/more known symbols than subset. if (getMa...
java
boolean symtabExtends(SymbolTable other) { // Throws ClassCastException if other isn't a local symtab LocalSymbolTable subset = (LocalSymbolTable) other; // Gather snapshots of each LST's data, so we don't // Superset must have same/more known symbols than subset. if (getMa...
[ "boolean", "symtabExtends", "(", "SymbolTable", "other", ")", "{", "// Throws ClassCastException if other isn't a local symtab", "LocalSymbolTable", "subset", "=", "(", "LocalSymbolTable", ")", "other", ";", "// Gather snapshots of each LST's data, so we don't", "// Superset must h...
This method, and the context from which it is called, assumes that the symtabs are not being mutated by another thread. Therefore it doesn't use synchronization.
[ "This", "method", "and", "the", "context", "from", "which", "it", "is", "called", "assumes", "that", "the", "symtabs", "are", "not", "being", "mutated", "by", "another", "thread", ".", "Therefore", "it", "doesn", "t", "use", "synchronization", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/LocalSymbolTable.java#L819-L862
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.newSymbolToken
public static SymbolToken newSymbolToken(SymbolTable symtab, String text) { // TODO amzn/ion-java/issues/21 symtab should not be null text.getClass(); // quick null check SymbolToken tok = (symtab == null ? null : symtab.find(text)); if (...
java
public static SymbolToken newSymbolToken(SymbolTable symtab, String text) { // TODO amzn/ion-java/issues/21 symtab should not be null text.getClass(); // quick null check SymbolToken tok = (symtab == null ? null : symtab.find(text)); if (...
[ "public", "static", "SymbolToken", "newSymbolToken", "(", "SymbolTable", "symtab", ",", "String", "text", ")", "{", "// TODO amzn/ion-java/issues/21 symtab should not be null", "text", ".", "getClass", "(", ")", ";", "// quick null check", "SymbolToken", "tok", "=", "("...
Checks symbol content. @return not null
[ "Checks", "symbol", "content", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L208-L220
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.newSymbolTokens
public static SymbolToken[] newSymbolTokens(SymbolTable symtab, String... text) { if (text != null) { int count = text.length; if (count != 0) { SymbolToken[] result = new SymbolToken[count]; ...
java
public static SymbolToken[] newSymbolTokens(SymbolTable symtab, String... text) { if (text != null) { int count = text.length; if (count != 0) { SymbolToken[] result = new SymbolToken[count]; ...
[ "public", "static", "SymbolToken", "[", "]", "newSymbolTokens", "(", "SymbolTable", "symtab", ",", "String", "...", "text", ")", "{", "if", "(", "text", "!=", "null", ")", "{", "int", "count", "=", "text", ".", "length", ";", "if", "(", "count", "!=", ...
Validates each text element. @param text may be null or empty. @return not null.
[ "Validates", "each", "text", "element", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L240-L258
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.toStrings
public static String[] toStrings(SymbolToken[] symbols, int count) { if (count == 0) return _Private_Utils.EMPTY_STRING_ARRAY; String[] annotations = new String[count]; for (int i = 0; i < count; i++) { SymbolToken tok = symbols[i]; String text = tok.getText(...
java
public static String[] toStrings(SymbolToken[] symbols, int count) { if (count == 0) return _Private_Utils.EMPTY_STRING_ARRAY; String[] annotations = new String[count]; for (int i = 0; i < count; i++) { SymbolToken tok = symbols[i]; String text = tok.getText(...
[ "public", "static", "String", "[", "]", "toStrings", "(", "SymbolToken", "[", "]", "symbols", ",", "int", "count", ")", "{", "if", "(", "count", "==", "0", ")", "return", "_Private_Utils", ".", "EMPTY_STRING_ARRAY", ";", "String", "[", "]", "annotations", ...
Extracts the non-null text from a list of symbol tokens. @return not null. @throws UnknownSymbolException if any token is missing text.
[ "Extracts", "the", "non", "-", "null", "text", "from", "a", "list", "of", "symbol", "tokens", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L358-L374
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.iterate
public static Iterator<IonValue> iterate(ValueFactory valueFactory, IonReader input) { return new IonIteratorImpl(valueFactory, input); }
java
public static Iterator<IonValue> iterate(ValueFactory valueFactory, IonReader input) { return new IonIteratorImpl(valueFactory, input); }
[ "public", "static", "Iterator", "<", "IonValue", ">", "iterate", "(", "ValueFactory", "valueFactory", ",", "IonReader", "input", ")", "{", "return", "new", "IonIteratorImpl", "(", "valueFactory", ",", "input", ")", ";", "}" ]
Create a value iterator from a reader. Primarily a trampoline for access permission.
[ "Create", "a", "value", "iterator", "from", "a", "reader", ".", "Primarily", "a", "trampoline", "for", "access", "permission", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L661-L665
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.isTrivialTable
public static boolean isTrivialTable(SymbolTable table) { if (table == null) return true; if (table.isSystemTable()) return true; if (table.isLocalTable()) { // this is only true when there are no local // symbols defined // and there are no import...
java
public static boolean isTrivialTable(SymbolTable table) { if (table == null) return true; if (table.isSystemTable()) return true; if (table.isLocalTable()) { // this is only true when there are no local // symbols defined // and there are no import...
[ "public", "static", "boolean", "isTrivialTable", "(", "SymbolTable", "table", ")", "{", "if", "(", "table", "==", "null", ")", "return", "true", ";", "if", "(", "table", ".", "isSystemTable", "(", ")", ")", "return", "true", ";", "if", "(", "table", "....
Is the table null, system, or local without imported symbols?
[ "Is", "the", "table", "null", "system", "or", "local", "without", "imported", "symbols?" ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L716-L729
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.copyLocalSymbolTable
public static SymbolTable copyLocalSymbolTable(SymbolTable symtab) throws SubstituteSymbolTableException { if (! symtab.isLocalTable()) { String message = "symtab should be a local symtab"; throw new IllegalArgumentException(message); } SymbolTable[] ...
java
public static SymbolTable copyLocalSymbolTable(SymbolTable symtab) throws SubstituteSymbolTableException { if (! symtab.isLocalTable()) { String message = "symtab should be a local symtab"; throw new IllegalArgumentException(message); } SymbolTable[] ...
[ "public", "static", "SymbolTable", "copyLocalSymbolTable", "(", "SymbolTable", "symtab", ")", "throws", "SubstituteSymbolTableException", "{", "if", "(", "!", "symtab", ".", "isLocalTable", "(", ")", ")", "{", "String", "message", "=", "\"symtab should be a local symt...
local symtab has substituted symtabs for imports.
[ "local", "symtab", "has", "substituted", "symtabs", "for", "imports", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L793-L820
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.initialSymtab
public static SymbolTable initialSymtab(_Private_LocalSymbolTableFactory lstFactory, SymbolTable defaultSystemSymtab, SymbolTable... imports) { if (imports == null || imports.length == 0) { return def...
java
public static SymbolTable initialSymtab(_Private_LocalSymbolTableFactory lstFactory, SymbolTable defaultSystemSymtab, SymbolTable... imports) { if (imports == null || imports.length == 0) { return def...
[ "public", "static", "SymbolTable", "initialSymtab", "(", "_Private_LocalSymbolTableFactory", "lstFactory", ",", "SymbolTable", "defaultSystemSymtab", ",", "SymbolTable", "...", "imports", ")", "{", "if", "(", "imports", "==", "null", "||", "imports", ".", "length", ...
Returns a minimal symtab that, either system or local depending on the given values, that supports representation as an IonStruct. If the imports are empty, the default system symtab is returned. @param lstFactory the factory to use to build the local symbol table, never null @param defaultSystemSymtab the default sys...
[ "Returns", "a", "minimal", "symtab", "that", "either", "system", "or", "local", "depending", "on", "the", "given", "values", "that", "supports", "representation", "as", "an", "IonStruct", ".", "If", "the", "imports", "are", "empty", "the", "default", "system",...
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L851-L866
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.isNonSymbolScalar
public static boolean isNonSymbolScalar(IonType type) { return ! IonType.isContainer(type) && ! type.equals(IonType.SYMBOL); }
java
public static boolean isNonSymbolScalar(IonType type) { return ! IonType.isContainer(type) && ! type.equals(IonType.SYMBOL); }
[ "public", "static", "boolean", "isNonSymbolScalar", "(", "IonType", "type", ")", "{", "return", "!", "IonType", ".", "isContainer", "(", "type", ")", "&&", "!", "type", ".", "equals", "(", "IonType", ".", "SYMBOL", ")", ";", "}" ]
Determines whether the passed-in data type is a scalar and not a symbol.
[ "Determines", "whether", "the", "passed", "-", "in", "data", "type", "is", "a", "scalar", "and", "not", "a", "symbol", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L991-L994
train
amzn/ion-java
src/com/amazon/ion/impl/_Private_Utils.java
_Private_Utils.getSidForSymbolTableField
public static final int getSidForSymbolTableField(String text) { final int shortestFieldNameLength = 4; // 'name' if (text != null && text.length() >= shortestFieldNameLength) { int c = text.charAt(0); switch (c) { case 'v': ...
java
public static final int getSidForSymbolTableField(String text) { final int shortestFieldNameLength = 4; // 'name' if (text != null && text.length() >= shortestFieldNameLength) { int c = text.charAt(0); switch (c) { case 'v': ...
[ "public", "static", "final", "int", "getSidForSymbolTableField", "(", "String", "text", ")", "{", "final", "int", "shortestFieldNameLength", "=", "4", ";", "// 'name'", "if", "(", "text", "!=", "null", "&&", "text", ".", "length", "(", ")", ">=", "shortestFi...
Returns the symbol ID matching a system symbol text of a local or shared symtab field.
[ "Returns", "the", "symbol", "ID", "matching", "a", "system", "symbol", "text", "of", "a", "local", "or", "shared", "symtab", "field", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/_Private_Utils.java#L1001-L1046
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.make_localtime
private Timestamp make_localtime() { int offset = _offset != null ? _offset.intValue() : 0; // We use a Copy-Constructor that expects the time parameters to be in // UTC, as that's what we're supposed to have. // As this Copy-Constructor doesn't apply local o...
java
private Timestamp make_localtime() { int offset = _offset != null ? _offset.intValue() : 0; // We use a Copy-Constructor that expects the time parameters to be in // UTC, as that's what we're supposed to have. // As this Copy-Constructor doesn't apply local o...
[ "private", "Timestamp", "make_localtime", "(", ")", "{", "int", "offset", "=", "_offset", "!=", "null", "?", "_offset", ".", "intValue", "(", ")", ":", "0", ";", "// We use a Copy-Constructor that expects the time parameters to be in", "// UTC, as that's what we're suppos...
Applies the local offset from UTC to each of the applicable time field values and returns the new Timestamp. In short, this makes the Timestamp represent local time. @return a new Timestamp in its local time
[ "Applies", "the", "local", "offset", "from", "UTC", "to", "each", "of", "the", "applicable", "time", "field", "values", "and", "returns", "the", "new", "Timestamp", ".", "In", "short", "this", "makes", "the", "Timestamp", "represent", "local", "time", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1192-L1220
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.getYear
public int getYear() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._year; }
java
public int getYear() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._year; }
[ "public", "int", "getYear", "(", ")", "{", "Timestamp", "adjusted", "=", "this", ";", "if", "(", "this", ".", "_offset", "!=", "null", ")", "{", "if", "(", "this", ".", "_offset", ".", "intValue", "(", ")", "!=", "0", ")", "{", "adjusted", "=", "...
Returns the year of this Timestamp, in its local time. @return a number within the range [1, 9999], in its local time
[ "Returns", "the", "year", "of", "this", "Timestamp", "in", "its", "local", "time", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1649-L1659
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.getMonth
public int getMonth() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._month; }
java
public int getMonth() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._month; }
[ "public", "int", "getMonth", "(", ")", "{", "Timestamp", "adjusted", "=", "this", ";", "if", "(", "this", ".", "_offset", "!=", "null", ")", "{", "if", "(", "this", ".", "_offset", ".", "intValue", "(", ")", "!=", "0", ")", "{", "adjusted", "=", ...
Returns the month of this Timestamp, in its local time. @return a number within the range [1, 12], whereby 1 refers to January and 12 refers to December, in its local time; 1 is returned if the Timestamp isn't precise to the month
[ "Returns", "the", "month", "of", "this", "Timestamp", "in", "its", "local", "time", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1671-L1681
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.getHour
public int getHour() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._hour; }
java
public int getHour() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._hour; }
[ "public", "int", "getHour", "(", ")", "{", "Timestamp", "adjusted", "=", "this", ";", "if", "(", "this", ".", "_offset", "!=", "null", ")", "{", "if", "(", "this", ".", "_offset", ".", "intValue", "(", ")", "!=", "0", ")", "{", "adjusted", "=", "...
Returns the hour of this Timestamp, in its local time. @return a number within the range [0, 23], in its local time; 0 is returned if the Timestamp isn't precise to the hour
[ "Returns", "the", "hour", "of", "this", "Timestamp", "in", "its", "local", "time", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1712-L1721
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.getMinute
public int getMinute() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._minute; }
java
public int getMinute() { Timestamp adjusted = this; if (this._offset != null) { if (this._offset.intValue() != 0) { adjusted = make_localtime(); } } return adjusted._minute; }
[ "public", "int", "getMinute", "(", ")", "{", "Timestamp", "adjusted", "=", "this", ";", "if", "(", "this", ".", "_offset", "!=", "null", ")", "{", "if", "(", "this", ".", "_offset", ".", "intValue", "(", ")", "!=", "0", ")", "{", "adjusted", "=", ...
Returns the minute of this Timestamp, in its local time. @return a number within the range [0, 59], in its local time; 0 is returned if the Timestamp isn't precise to the minute
[ "Returns", "the", "minute", "of", "this", "Timestamp", "in", "its", "local", "time", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1732-L1741
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.withLocalOffset
public Timestamp withLocalOffset(Integer offset) { Precision precision = getPrecision(); if (precision.alwaysUnknownOffset() || safeEquals(offset, getLocalOffset())) { return this; } Timestamp ts = createFromUtcFields(precision, ...
java
public Timestamp withLocalOffset(Integer offset) { Precision precision = getPrecision(); if (precision.alwaysUnknownOffset() || safeEquals(offset, getLocalOffset())) { return this; } Timestamp ts = createFromUtcFields(precision, ...
[ "public", "Timestamp", "withLocalOffset", "(", "Integer", "offset", ")", "{", "Precision", "precision", "=", "getPrecision", "(", ")", ";", "if", "(", "precision", ".", "alwaysUnknownOffset", "(", ")", "||", "safeEquals", "(", "offset", ",", "getLocalOffset", ...
Returns a timestamp at the same point in time, but with the given local offset. If this timestamp has precision coarser than minutes, then it is returned unchanged since such timestamps always have an unknown offset.
[ "Returns", "a", "timestamp", "at", "the", "same", "point", "in", "time", "but", "with", "the", "given", "local", "offset", ".", "If", "this", "timestamp", "has", "precision", "coarser", "than", "minutes", "then", "it", "is", "returned", "unchanged", "since",...
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L1948-L1967
train
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.clearUnusedPrecision
private void clearUnusedPrecision() { switch (_precision) { case YEAR: _month = 1; case MONTH: _day = 1; case DAY: _hour = 0; _minute = 0; case MINUTE: _second = 0; _fr...
java
private void clearUnusedPrecision() { switch (_precision) { case YEAR: _month = 1; case MONTH: _day = 1; case DAY: _hour = 0; _minute = 0; case MINUTE: _second = 0; _fr...
[ "private", "void", "clearUnusedPrecision", "(", ")", "{", "switch", "(", "_precision", ")", "{", "case", "YEAR", ":", "_month", "=", "1", ";", "case", "MONTH", ":", "_day", "=", "1", ";", "case", "DAY", ":", "_hour", "=", "0", ";", "_minute", "=", ...
Clears any fields more precise than this Timestamp's precision supports.
[ "Clears", "any", "fields", "more", "precise", "than", "this", "Timestamp", "s", "precision", "supports", "." ]
4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L2303-L2317
train