Packagecom.yworks.io
Classpublic class SymbolicPackageNameRegistry
InheritanceSymbolicPackageNameRegistry Inheritance Object

This registry can be used to map packages to symbolic package names. Objects that want to make use of the ReflectionBasesSerializer or ReflectionBasedDeserializer have to register their package with a symbolic package name these (de)serializer use.



Public Methods
 MethodDefined By
  
add(packageName:String, symbolicPackageName:String):Boolean
[static] Adds a mapping between the package name and a symbolic package name.
SymbolicPackageNameRegistry
  
addNamespace(packageName:String, ns:Namespace):void
[static]
SymbolicPackageNameRegistry
  
addPrefix(symbolicPackageName:String, prefix:String):void
[static]
SymbolicPackageNameRegistry
  
containsPackageName(packageName:String):Boolean
[static] Returns if the given package name is mapped to any symbolic package name.
SymbolicPackageNameRegistry
  
containsSymbolicPackageName(symbolicPackageName:String):Boolean
[static] Returns if any package in the registry is mapped to this symbolic package name.
SymbolicPackageNameRegistry
  
getNamespace(packageName:String):Namespace
[static]
SymbolicPackageNameRegistry
  
getPackageName(symbolicPackageName:String):String
Deprecated: Please Use getPackageNames
[static] As a symbolic package name can be mapped to multiple package names, this method is now deprecated.
SymbolicPackageNameRegistry
  
getPackageNames(symbolicPackageName:String):Array
[static] Returns the package names that the given symbolic name is mapped to.
SymbolicPackageNameRegistry
  
getPrefix(symbolicPackageName:String):String
[static]
SymbolicPackageNameRegistry
  
getSymbolicPackageName(packageName:String):String
[static] Returns the symbolic package name for the given package name.
SymbolicPackageNameRegistry
  
remove(packageName:String):Boolean
[static] Removes the mapping between the given package name and it's symbolic package name from the registry.
SymbolicPackageNameRegistry
  
removePrefix(symbolicPackageName:String):void
[static]
SymbolicPackageNameRegistry
Method Detail
add()method
public static function add(packageName:String, symbolicPackageName:String):Boolean

Adds a mapping between the package name and a symbolic package name. If there already exists a mapping for the given package name, the existing mapping will not be replaced, and this method will return false.

Parameters

packageName:String — The name of the package to set a symbolic name for.
 
symbolicPackageName:String — The symbolic name used for this package

Returns
Boolean — If the mapping was added to the registry or not.
addNamespace()method 
public static function addNamespace(packageName:String, ns:Namespace):void

Parameters

packageName:String
 
ns:Namespace

addPrefix()method 
public static function addPrefix(symbolicPackageName:String, prefix:String):void

Parameters

symbolicPackageName:String
 
prefix:String

containsPackageName()method 
public static function containsPackageName(packageName:String):Boolean

Returns if the given package name is mapped to any symbolic package name.

Parameters

packageName:String — The package name to check for a mapping

Returns
Boolean — if there exists a mapping for the given package name
containsSymbolicPackageName()method 
public static function containsSymbolicPackageName(symbolicPackageName:String):Boolean

Returns if any package in the registry is mapped to this symbolic package name.

Parameters

symbolicPackageName:String — The symbolic package name to find a package mapping for.

Returns
Boolean — if any package in the registry is mapped to this symbolic package name.
getNamespace()method 
public static function getNamespace(packageName:String):Namespace

Parameters

packageName:String

Returns
Namespace
getPackageName()method 
public static function getPackageName(symbolicPackageName:String):String
Deprecated: Please Use getPackageNames

As a symbolic package name can be mapped to multiple package names, this method is now deprecated. Use getPackageNames() instead.

Parameters

symbolicPackageName:String — The symbolic package name for which the package name shall be looked up.

Returns
String — The package name the given symbolic package name is mapped to.
getPackageNames()method 
public static function getPackageNames(symbolicPackageName:String):Array

Returns the package names that the given symbolic name is mapped to.

Parameters

symbolicPackageName:String — The symbolic package name for which the package name shall be looked up.

Returns
Array — The package names the given symbolic package name is mapped to.
getPrefix()method 
public static function getPrefix(symbolicPackageName:String):String

Parameters

symbolicPackageName:String

Returns
String
getSymbolicPackageName()method 
public static function getSymbolicPackageName(packageName:String):String

Returns the symbolic package name for the given package name.

Parameters

packageName:String — The package name for which the symbolic package name shall be looked up.

Returns
String — The symbolic package name mapped to this package name.
remove()method 
public static function remove(packageName:String):Boolean

Removes the mapping between the given package name and it's symbolic package name from the registry.

Parameters

packageName:String — The package name to remove the mapping.

Returns
Boolean — false, if there is no such package name in the registry, true otherwise.
removePrefix()method 
public static function removePrefix(symbolicPackageName:String):void

Parameters

symbolicPackageName:String