Package sc.layer

Class ReverseDependencies

  • All Implemented Interfaces:
    java.io.Serializable

    public class ReverseDependencies
    extends java.lang.Object
    implements java.io.Serializable
    For a given type, stores the references to the set of types which require bindable or dynamic behavior from this type for a given build layer
    See Also:
    Serialized Form
    • Field Detail

      • REVERSE_DEPENDENCIES_EXTENSION

        public static final java.lang.String REVERSE_DEPENDENCIES_EXTENSION
        See Also:
        Constant Field Values
      • typeIndex

        public java.util.HashMap<java.lang.Integer,​java.lang.String> typeIndex
      • bindableDeps

        public java.util.HashMap<java.lang.String,​ReverseDependencies.PropertyDep[]> bindableDeps
        Property name to type index code mapping for bindable properties
      • dynMethods

        public java.util.HashMap<MethodKey,​int[]> dynMethods
        Stores the list of methods which need to be available to the dynamic runtime. The external type index will code-generation the 'invoke('name')' method dispatch logic
      • typeGroupDeps

        public java.util.HashMap<java.lang.String,​java.util.ArrayList<java.lang.String>> typeGroupDeps
        Only created for files like web.xml which depend on the members of a given type group. When new members are added or removed, we need to regenerate the file
      • layer

        public transient Layer layer
        The build layer these deps were read from
    • Constructor Detail

      • ReverseDependencies

        public ReverseDependencies()
    • Method Detail

      • addBindDependency

        public void addBindDependency​(java.lang.String fromType,
                                      java.lang.String property,
                                      boolean referenceOnly)
      • addDynMethod

        public void addDynMethod​(java.lang.String fromType,
                                 java.lang.String methodName,
                                 java.lang.String paramSig)
      • cleanStaleEntries

        public void cleanStaleEntries​(java.util.HashSet<java.lang.String> changedTypes)
        This removes any dependencies from types in our registry which were changed but did not add a new entry. TODO: does this handle the case where we remove a file and do an incremental build?
      • saveReverseDeps

        public static void saveReverseDeps​(ReverseDependencies reverseDeps,
                                           java.lang.String revFileName)
      • hasChanged

        public boolean hasChanged()