Package sc.layer

Interface IRuntimeProcessor

    • Field Detail


        static final java.lang.String DEFAULT_RUNTIME_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • getRuntimeName

        java.lang.String getRuntimeName()
      • initRuntime

        boolean initRuntime​(boolean fromScratch)
        Return true if you need to build all files for this runtime. If fromScratch is true, prepare for a full rebuild
      • saveRuntime

        void saveRuntime()
      • initAfterRestore

        void initAfterRestore()
        Called after this runtime has been deserialized to init any transient fields
      • getStaticPrefix

        java.lang.String getStaticPrefix​(java.lang.Object def,
                                         JavaSemanticNode refNode)
        The prefix to use for transforming to JS
      • postStart

        void postStart​(LayeredSystem sys,
                       Layer genLayer)
        Called after starting all types
      • postStop

        void postStop​(LayeredSystem sys,
                      Layer genLayer)
        Called after stopping any layers from a previous build
      • postProcess

        void postProcess​(LayeredSystem sys,
                         Layer genLayer)
        Called after processing all types
      • getCompiledFiles

        java.lang.String[] getCompiledFiles​(java.lang.String lang)
      • getCompiledFiles

        java.util.List<java.lang.String> getCompiledFiles​(java.lang.String lang,
                                                          java.lang.String refTypeName)
      • getExecMode

        int getExecMode()
      • replaceMethodName

        java.lang.String replaceMethodName​(LayeredSystem sys,
                                           java.lang.Object methObj,
                                           java.lang.String name)
        Returns the given name or, if the runtime needs to rename this method for some reason (e.g. a conflict or framework injects a rename), returns the new method name.
      • runMainMethod

        java.lang.String runMainMethod​(java.lang.Object type,
                                       java.lang.String runClass,
                                       java.lang.String[] runClassArgs)
      • runStopMethod

        java.lang.String runStopMethod​(java.lang.Object type,
                                       java.lang.String runClass,
                                       java.lang.String stopMethod)
      • getDestinationName

        java.lang.String getDestinationName()
      • usesThisClasspath

        boolean usesThisClasspath()
      • usesLocalSyncManager

        boolean usesLocalSyncManager()
      • resetBuild

        void resetBuild()
        Called just before building the second time to clear out state from a previous build
      • getCompiledOnly

        boolean getCompiledOnly()
        If this returns true, no dynamic layers are enabled in this runtime
      • getNeedsAnonymousConversion

        boolean getNeedsAnonymousConversion()
        Javascript and other runtimes may need anonymous classes converted to real classes
      • getNeedsEnumToClassConversion

        boolean getNeedsEnumToClassConversion()
      • needsSrcForBuildAll

        boolean needsSrcForBuildAll​(java.lang.Object cl)
        Normally returns false - which means we can use .class files as an optimization except for special js types.
      • getLoadClassesInRuntime

        boolean getLoadClassesInRuntime()
        Some runtimes, like Javascript, are not active in Java so suppress loading classes there
      • getUseContextClassLoader

        boolean getUseContextClassLoader()
        Should this runtime use the Thread.currentThread().setContextClassLoader() mechanism (as used by java servlets and components)
      • getSyncProcessNames

        java.util.List<java.lang.String> getSyncProcessNames()
        The list of process names this runtime should sync against.
      • clearRuntime

        void clearRuntime()
        Called when all of the active layers have been cleared - to reset the state for a new clean compile
      • buildCompleted

        java.util.List<SrcEntry> buildCompleted()
        Called after a build has been completed, to init any state for the next new build. Returns a list of error files if there are any runtime specific build errors that should stop the compilation (e.g. a source file we depend on for the JS conversion that is not part of the project, but instead gets pulled in via a src.jar file like scrt.jar).
      • supportsSyncRemoteCalls

        boolean supportsSyncRemoteCalls()
        For JS or other async environments, return false - this means, remote method calls not in data binding statements generate errors at compile time
      • supportsTagCaching

        boolean supportsTagCaching()
        For server environment, we build the caching into the generated Tag object classes but on the client, the cache is the DOM itself so no need to set the cache property in the generated tag object
      • hasDefinitionForType

        boolean hasDefinitionForType​(java.lang.String typeName)