Package sc.lang

Interface ILanguageModel

    • Method Detail

      • getSrcFiles

        java.util.List<SrcEntry> getSrcFiles()
      • setLayeredSystem

        void setLayeredSystem​(LayeredSystem system)
      • getLayer

        Layer getLayer()
        Returns the layer which defined this particular model
      • setLayer

        void setLayer​(Layer l)
      • getPackagePrefix

        java.lang.String getPackagePrefix()
      • getModelTypeDeclaration

        TypeDeclaration getModelTypeDeclaration()
        Returns the main type declaration for the model - the one with the same name as the file
      • getModelType

        java.lang.Object getModelType()
        Same as getModelTypeDeclaration but if you have a template where the root type is a compiled class this method returns the class
      • getLayerTypeDeclaration

        TypeDeclaration getLayerTypeDeclaration()
        Returns the type declaration for this model for this layer
      • getUnresolvedModelTypeDeclaration

        TypeDeclaration getUnresolvedModelTypeDeclaration()
        Returns the type declaration for this model for this layer
      • getDefinedTypes

        java.util.Map<java.lang.String,​TypeDeclaration> getDefinedTypes()
      • setComputedPackagePrefix

        void setComputedPackagePrefix​(java.lang.String pref)
      • setDisableTypeErrors

        void setDisableTypeErrors​(boolean te)
      • getRelDirPath

        java.lang.String getRelDirPath()
      • saveModel

        void saveModel()
      • setLastModifiedTime

        void setLastModifiedTime​(long time)
      • setLastAccessTime

        void setLastAccessTime​(long time)
      • getLastAccessTime

        long getLastAccessTime()
      • getPrependPackage

        boolean getPrependPackage()
      • reinitialize

        void reinitialize()
        Called when dependent files for this type have changed and this type needs to re-evaluate itself from it's original AST. It might happen if the subclass depends on the code in the base class or if the subclass failed to compile and we need to retry things again.
      • setAdded

        void setAdded​(boolean added)
      • isAdded

        boolean isAdded()
      • markAsTemporary

        void markAsTemporary()
      • getUserData

        java.lang.Object getUserData()
      • sameModel

        boolean sameModel​(ILanguageModel other)
        An optimization - returns true if the other is the exact same model, Returns false if you are not sure.
      • refreshBoundTypes

        void refreshBoundTypes​(int flags)
      • flushTypeCache

        void flushTypeCache()
      • isInitialized

        boolean isInitialized()
      • isStarted

        boolean isStarted()
      • stop

        void stop()
        Called when this model nees to be regenerated
      • isUnsavedModel

        boolean isUnsavedModel()
      • isReplacedModel

        boolean isReplacedModel()
      • getNodeCount

        int getNodeCount()
      • restoreParseNode

        boolean restoreParseNode()
        Models can be parsed once and then serialized and de-serialized much faster. When a model is deserialized, we can restore the parse nodes using this operation. When the model is cached, we can either cache the parse-node tree as well or not. Either way, it's faster to restore the parse-node tree with the existing model than to parse it again from scratch.