Class AbstractInvocationTypeComputer

    • Constructor Detail

      • AbstractInvocationTypeComputer

        public AbstractInvocationTypeComputer()
        Instantiates a new abstract invocation type computer.
    • Method Detail

      • order

        public int order()
        Description copied from interface: TypeComputer
        Order of call to compute string literal type.
        Specified by:
        order in interface TypeComputer
        Returns:
        the order of call
      • getStaticInvocationParams

        protected Set<org.eclipse.xtext.util.Pair<String,​Integer>> getStaticInvocationParams​(StaticFeatureAccess featureAccess)
        Gets the static invocation parameters. Should return both English and Russian variants of method name. Clients should override this method to implement type computer on static invocation context.
        Parameters:
        featureAccess - the static feature access, if need dependably compute the collection of methods.
        Returns:
        the static invocation parameters, collection of global context method name and position of string literal in the invocation parameters.
      • getDynamicInvocationParams

        protected Set<org.eclipse.xtext.util.Pair<String,​Integer>> getDynamicInvocationParams​(DynamicFeatureAccess featureAccess)
        Gets the dynamic invocation parameters. Should return both English and Russian variants of method name. Clients should override this method to implement type computer on dynamic invocation context.
        Parameters:
        featureAccess - the dynamic feature access, if need dependably compute the collection of methods.
        Returns:
        the dynamic invocation parameters, collection of type context method name and position of string literal in the invocation parameters.
      • getDynamicInvocationSourceTypes

        protected Collection<String> getDynamicInvocationSourceTypes​(DynamicFeatureAccess fa)
        Gets the type names of the source of the dynamic invocation method. Clients should override this method to implement type computer on dynamic invocation context.
        Parameters:
        fa - the dynamic feature access to get collection of its source types, if dependable on DynamicFeatureAccess
        Returns:
        the type names of source of dynamic invocation.
      • isValidModule

        protected boolean isValidModule​(Supplier<Module> module,
                                        FeatureAccess fa)
        Checks if the module is valid for this string literal content type computing in some invocation context. This method allows to check module type, FeatureAccess Environments or any other heavy computing condition if the method of invocation and string literal parameter position matches the requirement.
        Parameters:
        module - the supplier of module to check
        fa - the feature access to check
        Returns:
        true, if the module is valid to compute.