Class ExternalLocationDB

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Function createFunction()
      Create an external function associated with this location or return the existing function if one already exists
      boolean equals​(java.lang.Object obj)  
      Address getAddress()
      Returns the external address if known, or null
      DataType getDataType()
      Returns the DataType which has been associated with this location.
      Address getExternalSpaceAddress()
      Returns the address in "External" (fake) space where this location is stored.
      Function getFunction()
      Returns the external function associated with this location or null if this is a data location.
      java.lang.String getLabel()
      Returns the external label associated with this location.
      java.lang.String getLibraryName()
      Returns the name of the external program containing this location.
      java.lang.String getOriginalImportedName()
      Returns the original name for this location.
      java.lang.String getParentName()
      Returns the name of the parent namespace containing this location.
      Namespace getParentNameSpace()
      Returns the parent namespace containing this location.
      SourceType getSource()
      Returns the source of this location.
      Symbol getSymbol()
      Returns the symbol associated with this external location or null.
      int hashCode()  
      boolean isEquivalent​(ExternalLocation other)
      Returns true if the given external location has the same name, namespace, original import name, and external address.
      boolean isFunction()  
      void restoreOriginalName()
      If this external location has a replacement name, then the primary symbol will be deleted and the original symbol will become the primary symbol, effectively restoring the location to it's original name.
      void saveOriginalNameIfNeeded​(Namespace oldNamespace, java.lang.String oldName, SourceType oldSource)  
      void setAddress​(Address address)
      Sets the address in the external program associated with this location.
      void setDataType​(DataType dt)
      Associate the specified data type with this location.
      void setLocation​(java.lang.String label, Address addr, SourceType source)
      Set the external label which defines this location.
      void setName​(Namespace namespace, java.lang.String newName, SourceType sourceType)
      Set a new name for this external location.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getSymbol

        public Symbol getSymbol()
        Description copied from interface: ExternalLocation
        Returns the symbol associated with this external location or null.
        Specified by:
        getSymbol in interface ExternalLocation
        Returns:
        the symbol associated with this external location or null.
      • getOriginalImportedName

        public java.lang.String getOriginalImportedName()
        Description copied from interface: ExternalLocation
        Returns the original name for this location. Will be null if the name was never changed.
        Specified by:
        getOriginalImportedName in interface ExternalLocation
        Returns:
        the original name for this location. Will be null if the name was never changed.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isFunction

        public boolean isFunction()
        Specified by:
        isFunction in interface ExternalLocation
        Returns:
        true if location corresponds to a function
      • getFunction

        public Function getFunction()
        Description copied from interface: ExternalLocation
        Returns the external function associated with this location or null if this is a data location.
        Specified by:
        getFunction in interface ExternalLocation
        Returns:
        external function associated with this location or null if this is a data location.
      • createFunction

        public Function createFunction()
        Description copied from interface: ExternalLocation
        Create an external function associated with this location or return the existing function if one already exists
        Specified by:
        createFunction in interface ExternalLocation
        Returns:
        external function
      • setLocation

        public void setLocation​(java.lang.String label,
                                Address addr,
                                SourceType source)
                         throws InvalidInputException
        Description copied from interface: ExternalLocation
        Set the external label which defines this location.
        Specified by:
        setLocation in interface ExternalLocation
        Parameters:
        label - external label, may be null if addr is not null. Label may also be namespace qualified and best effort will be used to parse namespace (see SymbolPath). If a namespace is not included within label, the current namespace will be preserved. Note that this method does not properly handle the presence of template information within the label.
        addr - external address, may be null
        source - the source of the external label name
        Throws:
        InvalidInputException
      • setAddress

        public void setAddress​(Address address)
                        throws InvalidInputException
        Description copied from interface: ExternalLocation
        Sets the address in the external program associated with this location. The address may not be null if location has a default label.
        Specified by:
        setAddress in interface ExternalLocation
        Parameters:
        address - the address to set.
        Throws:
        InvalidInputException - if address is null and location currently has a default name
      • saveOriginalNameIfNeeded

        public void saveOriginalNameIfNeeded​(Namespace oldNamespace,
                                             java.lang.String oldName,
                                             SourceType oldSource)
      • setName

        public void setName​(Namespace namespace,
                            java.lang.String newName,
                            SourceType sourceType)
                     throws InvalidInputException
        Description copied from interface: ExternalLocation
        Set a new name for this external location. The new name will become the primary symbol for this location. The current name for this location will be saved as the original symbol for this location.
        Specified by:
        setName in interface ExternalLocation
        Parameters:
        namespace - the namespace for the original symbol. Can be different than original symbol
        newName - the user-friendly name.
        sourceType - the SourceType for the new name.
        Throws:
        InvalidInputException - if the name contains illegal characters (space for example)
      • restoreOriginalName

        public void restoreOriginalName()
        Description copied from interface: ExternalLocation
        If this external location has a replacement name, then the primary symbol will be deleted and the original symbol will become the primary symbol, effectively restoring the location to it's original name.
        Specified by:
        restoreOriginalName in interface ExternalLocation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • isEquivalent

        public boolean isEquivalent​(ExternalLocation other)
        Description copied from interface: ExternalLocation
        Returns true if the given external location has the same name, namespace, original import name, and external address.
        Specified by:
        isEquivalent in interface ExternalLocation
        Parameters:
        other - the other ExternalLocation to compare
        Returns:
        true if the other location is equivalent to this one.