idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
34,400 | public ConstructorDoc wrap ( ConstructorDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof ConstructorDocImpl ) ) { return source ; } return new ConstructorDocWrapper ( ( ConstructorDocImpl ) source ) ; } | Wrap a constructor doc . |
34,401 | public MethodDoc wrap ( MethodDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof MethodDocImpl ) ) { return source ; } return new MethodDocWrapper ( ( MethodDocImpl ) source ) ; } | Wrap a method doc . |
34,402 | public AnnotationTypeElementDoc wrap ( AnnotationTypeElementDoc source ) { if ( source == null || source instanceof Proxy < ? > || ! ( source instanceof AnnotationTypeElementDocImpl ) ) { return source ; } return new AnnotationTypeElementDocWrapper ( ( AnnotationTypeElementDocImpl ) source ) ; } | Wrap a annotation type element doc . |
34,403 | @ 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 ) ; } | Convert seconds to milliseconds . |
34,404 | @ 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 ) ; } | Convert minutes to milliseconds . |
34,405 | @ 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 ) ; } | Convert hours to milliseconds . |
34,406 | @ 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 ) ; } | Convert days to milliseconds . |
34,407 | @ 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 ) ; } | Convert weeks to milliseconds . |
34,408 | public Injector createInjectorAndDoEMFRegistration ( Module ... modules ) { doPreSetup ( ) ; final Injector injector = createInjector ( modules ) ; register ( injector ) ; return injector ; } | Create the injector based on the given set of modules and prepare the EMF infrastructure . |
34,409 | @ SuppressWarnings ( "static-method" ) public Injector createInjector ( Module ... modules ) { return Guice . createInjector ( Modules . override ( new SARLRuntimeModule ( ) ) . with ( modules ) ) ; } | Create the injectors based on the given set of modules . |
34,410 | 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... | Replies the installation order of the given skill . |
34,411 | 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 firs... | Returns a page to use for editing a SRE install type . |
34,412 | protected Resource getXtextResource ( ) { final XtextEditor editor = getEditor ( ) ; if ( editor != null ) { final IResource resource = editor . getResource ( ) ; if ( resource instanceof IStorage ) { final IProject project = resource . getProject ( ) ; if ( project != null ) { final ResourceSet resourceSet = this . re... | Replies the current Xtext document that is supported by the linked editor . |
34,413 | protected void generateExpressionAppender ( ) { final TypeReference builderInterface = getExpressionBuilderInterface ( ) ; final TypeReference appender = getCodeElementExtractor ( ) . getElementAppenderImpl ( "Expression" ) ; final StringConcatenationClient content = new StringConcatenationClient ( ) { protected void a... | Generate the expression appender . |
34,414 | 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 ( ) . getFieldC... | Replies a keyword for declaring a container . |
34,415 | protected String ensureFieldDeclarationKeyword ( CodeElementExtractor . ElementDescription memberDescription ) { final List < String > modifiers = getCodeBuilderConfig ( ) . getModifiers ( ) . get ( memberDescription . getName ( ) ) ; if ( modifiers != null && ! modifiers . isEmpty ( ) ) { return modifiers . get ( 0 ) ... | Replies a keyword for declaring a field . |
34,416 | protected ExpressionContextDescription getExpressionContextDescription ( ) { for ( final CodeElementExtractor . ElementDescription containerDescription : getCodeElementExtractor ( ) . getTopElements ( getGrammar ( ) , getCodeBuilderConfig ( ) ) ) { final AbstractRule rule = getMemberRule ( containerDescription ) ; if (... | Replies the description of the expression context . |
34,417 | public EventSpace postConstruction ( ) { this . spaceRepository . postConstruction ( ) ; this . defaultSpace = createSpace ( OpenEventSpaceSpecification . class , this . defaultSpaceID ) ; if ( this . defaultSpace == null ) { this . defaultSpace = ( OpenEventSpace ) this . spaceRepository . getSpace ( new SpaceID ( thi... | Create the default space in this context . |
34,418 | @ SuppressWarnings ( "checkstyle:magicnumber" ) public TextStyle capacityMethodInvocation ( ) { final TextStyle textStyle = extensionMethodInvocation ( ) . copy ( ) ; textStyle . setStyle ( SWT . ITALIC ) ; return textStyle ; } | Style for the capacity method extension . |
34,419 | public void validate ( StateAccess validationState , ValidationMessageAcceptor messageAcceptor ) { if ( isResponsible ( validationState . getState ( ) . context , validationState . getState ( ) . currentObject ) ) { try { for ( final MethodWrapper method : getMethods ( validationState . getState ( ) . currentObject ) )... | Validate the given resource . |
34,420 | 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 (... | Collect the check methods . |
34,421 | @ SuppressWarnings ( "static-method" ) protected boolean isResponsible ( Map < Object , Object > context , EObject eObject ) { if ( eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall ) { final XAbstractFeatureCall rootFeatureCall = Utils . getRootFeatureCall ( ( XAbstractFeatureCall ) eObject ) ; ... | Replies if the validator is responsible to validate the given object . |
34,422 | 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_GENERA... | Generate an error for the extra - language . |
34,423 | 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_GE... | Generate a warning for the extra - language . |
34,424 | 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_GENERATI... | Generate an information message for the extra - language . |
34,425 | public ExtraLanguageTypeConverter getTypeConverter ( ) { ExtraLanguageTypeConverter converter = this . typeConverter ; if ( converter == null ) { converter = createTypeConverterInstance ( getTypeConverterInitializer ( ) , null ) ; this . injector . injectMembers ( converter ) ; this . typeConverter = converter ; } retu... | Replies the type converter . |
34,426 | @ SuppressWarnings ( "static-method" ) protected ExtraLanguageTypeConverter createTypeConverterInstance ( IExtraLanguageConversionInitializer initializer , IExtraLanguageGeneratorContext context ) { return new ExtraLanguageTypeConverter ( initializer , context ) ; } | Create the instance of the type converter . |
34,427 | public ExtraLanguageFeatureNameConverter getFeatureNameConverter ( ) { ExtraLanguageFeatureNameConverter converter = this . featureConverter ; if ( converter == null ) { converter = createFeatureNameConverterInstance ( getFeatureConverterInitializer ( ) , null ) ; this . injector . injectMembers ( converter ) ; this . ... | Replies the feature name converter . |
34,428 | protected ExtraLanguageFeatureNameConverter createFeatureNameConverterInstance ( IExtraLanguageConversionInitializer initializer , IExtraLanguageGeneratorContext context ) { return new ExtraLanguageFeatureNameConverter ( initializer , context , getExtraLanguageKeywordProvider ( ) ) ; } | Create the instance of the feature name converter . |
34,429 | 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 ( conve... | Do a type mapping check . |
34,430 | protected void doCheckMemberFeatureCallMapping ( XAbstractFeatureCall featureCall , Procedure3 < ? super EObject , ? super JvmType , ? super String > typeErrorHandler , Function2 < ? super EObject , ? super JvmIdentifiableElement , ? extends Boolean > featureErrorHandler ) { final XAbstractFeatureCall rootFeatureCall =... | Check if the feature call could be translated to the extra - language . |
34,431 | @ SuppressWarnings ( "static-method" ) protected void handleInvocationTargetException ( Throwable targetException , Context context ) { if ( ! ( targetException instanceof NullPointerException ) ) { Exceptions . throwUncheckedException ( targetException ) ; } } | Handle an exception . |
34,432 | protected ITreeAppendable generateStaticConstructor ( JvmOperation it , ITreeAppendable appendable , GeneratorConfig config ) { appendable . newLine ( ) ; appendable . openScope ( ) ; generateJavaDoc ( it , appendable , config ) ; final ITreeAppendable tracedAppendable = appendable . trace ( it ) ; tracedAppendable . a... | Generate a static constructor from the given Jvm constructor . |
34,433 | public static int open ( Shell parentShell ) { final SubmitEclipseLogWizard wizard = new SubmitEclipseLogWizard ( ) ; final WizardDialog dialog = new WizardDialog ( parentShell , wizard ) ; wizard . setWizardDialog ( dialog ) ; return dialog . open ( ) ; } | Open the wizard . |
34,434 | WizardDialog getWizardDialog ( ) { final WeakReference < WizardDialog > ref = this . wizardDialog ; return ( ref == null ) ? null : ref . get ( ) ; } | Replies the associated wieard dialog . |
34,435 | @ SuppressWarnings ( "static-method" ) protected String buildContent ( String description , Charset charset ) throws IOException { final StringBuilder fullContent = new StringBuilder ( ) ; if ( ! Strings . isEmpty ( description ) ) { fullContent . append ( description ) ; fullContent . append ( Messages . SubmitEclipse... | Build the issue content . |
34,436 | 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 . serviceList... | Set the reference to the space service . |
34,437 | 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 NetworkServiceListener listener : ilist... | Notifies that a peer space was connected . |
34,438 | 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 NetworkServiceListener listener : il... | Notifies that a peer space was disconnected . |
34,439 | protected void firePeerDiscovered ( URI peerURI ) { final NetworkServiceListener [ ] ilisteners ; synchronized ( this . listeners ) { ilisteners = new NetworkServiceListener [ this . listeners . size ( ) ] ; this . listeners . toArray ( ilisteners ) ; } for ( final NetworkServiceListener listener : ilisteners ) { liste... | Notifies that a peer was discovered . |
34,440 | private static EventEnvelope extractEnvelope ( Socket socket ) throws IOException { byte [ ] data = socket . recv ( ZMQ . DONTWAIT ) ; byte [ ] cdata ; int oldSize = 0 ; while ( socket . hasReceiveMore ( ) ) { cdata = socket . recv ( ZMQ . DONTWAIT ) ; oldSize = data . length ; data = Arrays . copyOf ( data , data . le... | Receive data from the network . |
34,441 | 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 ... | Extract data from a received envelope and forwad it to the rest of the platform . |
34,442 | public GeneratorConfig getGeneratorConfig ( ) { if ( this . generatorConfig == null ) { this . generatorConfig = this . generatorConfigProvider . get ( EcoreUtil . getRootContainer ( this . contextObject ) ) ; } return this . generatorConfig ; } | Replies the generator configuration . |
34,443 | public GeneratorConfig2 getGeneratorConfig2 ( ) { if ( this . generatorConfig2 == null ) { this . generatorConfig2 = this . generatorConfigProvider2 . get ( EcoreUtil . getRootContainer ( this . contextObject ) ) ; } return this . generatorConfig2 ; } | Replies the generator configuration v2 . |
34,444 | 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 < P... | Replies the guard evaluation code for the given event . |
34,445 | public List < Runnable > getPostFinalizationElements ( ) { final GenerationContext prt = getParentContext ( ) ; if ( prt != null ) { return prt . getPostFinalizationElements ( ) ; } return this . postFinalization ; } | Replies the collection of the elements that must be generated after the generation process of the current SARL element . |
34,446 | public GeneratorConfig2 install ( final ResourceSet resourceSet , GeneratorConfig2 config ) { GeneratorConfigAdapter adapter = GeneratorConfigAdapter . findInEmfObject ( resourceSet ) ; if ( adapter == null ) { adapter = new GeneratorConfigAdapter ( ) ; } adapter . attachToEmfObject ( resourceSet ) ; return adapter . g... | Install the given configuration in the resource set . |
34,447 | 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 QualifiedN... | Get the string representation of an operator . |
34,448 | public static String getCallSimpleName ( XAbstractFeatureCall featureCall , ILogicalContainerProvider logicalContainerProvider , IdentifiableSimpleNameProvider featureNameProvider , Function0 < ? extends String > nullKeyword , Function0 < ? extends String > thisKeyword , Function0 < ? extends String > superKeyword , Fu... | Compute the simple name for the called feature . |
34,449 | 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 m... | Compute the list of object that serve as the receiver for the given call . |
34,450 | @ 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 ; str = JanusConfig . getSystemProperty ( JanusConfig . BOOT_DEFAULT_CONTEXT_ID_NAME ) ; if ... | Create a context identifier . |
34,451 | @ 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 ) ; } | Construct a space identifier . |
34,452 | 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 ( ) ; } if ( a != null ) { pubUri = Netw... | Extract the current value of the PUB_URI from the system s property or form the platform default value . |
34,453 | 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 ( ... | Analyzing the type hierarchy of the given interface and extract hierarchy information . |
34,454 | 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 ; } | Replies if the last parameter is a variadic parameter . |
34,455 | public static String createNameForHiddenCapacityImplementationAttribute ( String id ) { return PREFIX_CAPACITY_IMPLEMENTATION + fixHiddenMember ( id . toUpperCase ( ) ) . replace ( "." , HIDDEN_MEMBER_REPLACEMENT_CHARACTER ) ; } | Create the name of the hidden field that is containing a capacity implementation . |
34,456 | public static boolean isNameForHiddenCapacityImplementationCallingMethod ( String simpleName ) { return simpleName != null && simpleName . startsWith ( PREFIX_CAPACITY_IMPLEMENTATION ) && simpleName . endsWith ( POSTFIX_CAPACITY_IMPLEMENTATION_CALLER ) ; } | Replies if the given simple name is the name of the hidden method that is calling a capacity implementation . |
34,457 | 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 . |
34,458 | 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 . |
34,459 | public static boolean isClass ( LightweightTypeReference typeRef ) { final JvmType t = typeRef . getType ( ) ; if ( t instanceof JvmGenericType ) { return ! ( ( JvmGenericType ) t ) . isInterface ( ) ; } return false ; } | Replies if the given reference is pointing to a class type . |
34,460 | public static boolean isFinal ( LightweightTypeReference expressionTypeRef ) { if ( expressionTypeRef . isArray ( ) ) { return isFinal ( expressionTypeRef . getComponentType ( ) ) ; } if ( expressionTypeRef . isPrimitive ( ) ) { return true ; } return expressionTypeRef . getType ( ) instanceof JvmDeclaredType && ( ( Jv... | Replies if the given reference is referencing a final type . |
34,461 | 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 ( ) ) ; } | Replies if the given type is a final type . |
34,462 | public static boolean isInterface ( LightweightTypeReference type ) { return type . getType ( ) instanceof JvmGenericType && ( ( JvmGenericType ) type . getType ( ) ) . isInterface ( ) ; } | Replies if the given type is an interface . |
34,463 | @ SuppressWarnings ( { "checkstyle:cyclomaticcomplexity" , "checkstyle:booleanexpressioncomplexity" } ) public static boolean canCast ( LightweightTypeReference fromType , LightweightTypeReference toType , boolean enablePrimitiveWidening , boolean enableVoidMatchingNull , boolean allowSynonyms ) { if ( enableVoidMatchi... | Replies if it is allowed to cast between the given types . |
34,464 | public static LightweightTypeReference toLightweightTypeReference ( JvmType type , CommonTypeComputationServices services , boolean keepUnboundWildcardInformation ) { if ( type == null ) { return null ; } final StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner ( services , type ) ; final LightweightType... | Convert a type to a lightweight type reference . |
34,465 | public static int compareVersions ( String v1 , String v2 ) { final Version vobject1 = Version . parseVersion ( v1 ) ; final Version vobject2 = Version . parseVersion ( v2 ) ; return vobject1 . compareTo ( vobject2 ) ; } | Compare the two strings as they are version numbers . |
34,466 | 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]+" , " " ) ; } return Strings . emptyToNull ( text ) ; } ... | Replies the original code for the given Ecore object . |
34,467 | 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 ; } | Replies if the given declaration has an abstract member . |
34,468 | public static boolean isCompatibleSARLLibraryOnClasspath ( TypeReferences typeReferences , Notifier context ) { final OutParameter < String > version = new OutParameter < > ( ) ; final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath ( typeReferences , context , version ) ; if ( code == SarlLibraryErrorCode... | Check if a compatible SARL library is available on the classpath . |
34,469 | 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 ( ) == para... | Check if a version is compatible with the expected SARL library . |
34,470 | 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 ( c... | Check if a version of the JRE is compatible with the SARL library . |
34,471 | public static boolean isCompatibleXtextVersion ( String version ) { return version != null && ! version . isEmpty ( ) && compareVersions ( version , SARLVersion . MINIMAL_XTEXT_VERSION ) >= 0 ; } | Check if a version of Xtext is compatible with the SARL library . |
34,472 | public static boolean isCompatibleXtextVersion ( ) { final XtextVersion xtextVersion = XtextVersion . getCurrent ( ) ; if ( xtextVersion != null && ! Strings . isNullOrEmpty ( xtextVersion . getVersion ( ) ) ) { return isCompatibleXtextVersion ( xtextVersion . getVersion ( ) ) ; } return false ; } | Check if a version of the current Xtext is compatible with the SARL library . |
34,473 | public static boolean isSARLAnnotation ( Class < ? > type ) { return ( type != null && Annotation . class . isAssignableFrom ( type ) ) && isSARLAnnotation ( type . getPackage ( ) . getName ( ) ) ; } | Replies if the given annotation is an annotation from the SARL core library . |
34,474 | public static boolean isFunctionalInterface ( JvmGenericType type , IActionPrototypeProvider sarlSignatureProvider ) { if ( type != null && type . isInterface ( ) ) { final Map < ActionPrototype , JvmOperation > operations = new HashMap < > ( ) ; populateInterfaceElements ( type , operations , null , sarlSignatureProvi... | Replies if the given type is a functional interface . |
34,475 | @ 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 . g... | Dump the object . |
34,476 | public static JvmTypeReference cloneWithTypeParametersAndProxies ( JvmTypeReference type , Iterable < JvmTypeParameter > executableTypeParameters , Map < String , JvmTypeReference > superTypeParameterMapping , JvmTypeReferenceBuilder typeParameterBuilder , JvmTypesBuilder typeBuilder , TypeReferences typeReferences , T... | Clone the given type reference that for being link to the given operation . |
34,477 | public static void getSuperTypeParameterMap ( JvmDeclaredType type , Map < String , JvmTypeReference > mapping ) { for ( final JvmTypeReference superTypeReference : type . getSuperTypes ( ) ) { if ( superTypeReference instanceof JvmParameterizedTypeReference ) { final JvmParameterizedTypeReference parameterizedTypeRefe... | Extract the mapping between the type parameters declared within the super types and the type parameters arguments that are declared within the given type . |
34,478 | 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 ) ; } } | Set the given structure feature with the given value . |
34,479 | public static XAbstractFeatureCall getRootFeatureCall ( XAbstractFeatureCall featureCall ) { final EObject container = featureCall . eContainer ( ) ; final XAbstractFeatureCall rootFeatureCall ; if ( container instanceof XMemberFeatureCall || container instanceof XFeatureCall ) { rootFeatureCall = ( XAbstractFeatureCal... | Replies the root feature call into a sequence of feature calls . |
34,480 | public static XAbstractFeatureCall getRootFeatureCall ( XAbstractFeatureCall featureCall , XExpression container , List < JvmFormalParameter > containerParameters ) { if ( hasLocalParameters ( featureCall , container , containerParameters ) || ! ( featureCall instanceof XMemberFeatureCall || featureCall instanceof XFea... | 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 . |
34,481 | 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 ; } } return false ; } | not supported . |
34,482 | int putSymbol ( String symbolName ) { if ( isReadOnly ) { throw new ReadOnlyValueException ( SymbolTable . class ) ; } if ( mySymbolsCount == mySymbolNames . length ) { int newlen = mySymbolsCount * 2 ; if ( newlen < DEFAULT_CAPACITY ) { newlen = DEFAULT_CAPACITY ; } String [ ] temp = new String [ newlen ] ; System . a... | NOT SYNCHRONIZED! Call within constructor or from synch d method . |
34,483 | boolean symtabExtends ( SymbolTable other ) { LocalSymbolTable subset = ( LocalSymbolTable ) other ; if ( getMaxId ( ) < subset . getMaxId ( ) ) return false ; if ( ! myImportsList . equalImports ( subset . myImportsList ) ) return false ; int subLocalSymbolCount = subset . mySymbolsCount ; if ( subLocalSymbolCount == ... | 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 . |
34,484 | public static SymbolToken newSymbolToken ( SymbolTable symtab , String text ) { text . getClass ( ) ; SymbolToken tok = ( symtab == null ? null : symtab . find ( text ) ) ; if ( tok == null ) { tok = new SymbolTokenImpl ( text , UNKNOWN_SYMBOL_ID ) ; } return tok ; } | Checks symbol content . |
34,485 | public static SymbolToken [ ] newSymbolTokens ( SymbolTable symtab , String ... text ) { if ( text != null ) { int count = text . length ; if ( count != 0 ) { SymbolToken [ ] result = new SymbolToken [ count ] ; for ( int i = 0 ; i < count ; i ++ ) { String s = text [ i ] ; result [ i ] = newSymbolToken ( symtab , s ) ... | Validates each text element . |
34,486 | 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 ( ) ; if ( text == null ) { thr... | Extracts the non - null text from a list of symbol tokens . |
34,487 | 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 . |
34,488 | public static boolean isTrivialTable ( SymbolTable table ) { if ( table == null ) return true ; if ( table . isSystemTable ( ) ) return true ; if ( table . isLocalTable ( ) ) { if ( table . getMaxId ( ) == table . getSystemSymbolTable ( ) . getMaxId ( ) ) { return true ; } } return false ; } | Is the table null system or local without imported symbols? |
34,489 | public static SymbolTable copyLocalSymbolTable ( SymbolTable symtab ) throws SubstituteSymbolTableException { if ( ! symtab . isLocalTable ( ) ) { String message = "symtab should be a local symtab" ; throw new IllegalArgumentException ( message ) ; } SymbolTable [ ] imports = ( ( LocalSymbolTable ) symtab ) . getImport... | local symtab has substituted symtabs for imports . |
34,490 | public static SymbolTable initialSymtab ( _Private_LocalSymbolTableFactory lstFactory , SymbolTable defaultSystemSymtab , SymbolTable ... imports ) { if ( imports == null || imports . length == 0 ) { return defaultSystemSymtab ; } if ( imports . length == 1 && imports [ 0 ] . isSystemTable ( ) ) { return imports [ 0 ] ... | 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 . |
34,491 | 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 . |
34,492 | public static final int getSidForSymbolTableField ( String text ) { final int shortestFieldNameLength = 4 ; if ( text != null && text . length ( ) >= shortestFieldNameLength ) { int c = text . charAt ( 0 ) ; switch ( c ) { case 'v' : if ( VERSION . equals ( text ) ) { return VERSION_SID ; } break ; case 'n' : if ( NAME... | Returns the symbol ID matching a system symbol text of a local or shared symtab field . |
34,493 | private Timestamp make_localtime ( ) { int offset = _offset != null ? _offset . intValue ( ) : 0 ; Timestamp localtime = new Timestamp ( _precision , _year , _month , _day , _hour , _minute , _second , _fraction , _offset , APPLY_OFFSET_NO ) ; localtime . apply_offset ( - offset ) ; assert localtime . _offset == _offse... | 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 . |
34,494 | public int getYear ( ) { Timestamp adjusted = this ; if ( this . _offset != null ) { if ( this . _offset . intValue ( ) != 0 ) { adjusted = make_localtime ( ) ; } } return adjusted . _year ; } | Returns the year of this Timestamp in its local time . |
34,495 | public int getMonth ( ) { Timestamp adjusted = this ; if ( this . _offset != null ) { if ( this . _offset . intValue ( ) != 0 ) { adjusted = make_localtime ( ) ; } } return adjusted . _month ; } | Returns the month of this Timestamp in its local time . |
34,496 | public int getHour ( ) { Timestamp adjusted = this ; if ( this . _offset != null ) { if ( this . _offset . intValue ( ) != 0 ) { adjusted = make_localtime ( ) ; } } return adjusted . _hour ; } | Returns the hour of this Timestamp in its local time . |
34,497 | public int getMinute ( ) { Timestamp adjusted = this ; if ( this . _offset != null ) { if ( this . _offset . intValue ( ) != 0 ) { adjusted = make_localtime ( ) ; } } return adjusted . _minute ; } | Returns the minute of this Timestamp in its local time . |
34,498 | public Timestamp withLocalOffset ( Integer offset ) { Precision precision = getPrecision ( ) ; if ( precision . alwaysUnknownOffset ( ) || safeEquals ( offset , getLocalOffset ( ) ) ) { return this ; } Timestamp ts = createFromUtcFields ( precision , getZYear ( ) , getZMonth ( ) , getZDay ( ) , getZHour ( ) , getZMinut... | 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 . |
34,499 | private void clearUnusedPrecision ( ) { switch ( _precision ) { case YEAR : _month = 1 ; case MONTH : _day = 1 ; case DAY : _hour = 0 ; _minute = 0 ; case MINUTE : _second = 0 ; _fraction = null ; case SECOND : } } | Clears any fields more precise than this Timestamp s precision supports . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.