package

File package.str
Author Martin Bravenboer <martin@cs.uu.nl>
Since unknown

Class that represents a Java Package.




Statistics


General
Lines of code 279
Stratego
Module number 1 (100% documented)
Constructor number 1 (100% documented)
Overlay number 0
Strategy number 24 (87% documented)
Rule number 0
DynamicRule number 0



Constructor summary


JavaPackage(ATerm ) Identifier for the class Package package.str

Strategy summary


add-subpackage(ATerm name) Creates a new subpackage in the current package package.str
add-toplevel-class(ATerm class) n/a package.str
get-canonical-name Returns the canonical name of this package package.str
get-fully-qualified-name Returns the full qualified name of this package package.str
get-or-add-subpackage(ATerm name) Ensures that a subpackage exists in the current package package.str
get-or-add-subsubpackage(ATerm names) Ensures that a subpackage exists in the current package package.str
get-parent-package Returns the parent package package.str
get-simple-name Returns the simple name of this package package.str
get-subpackage(ATerm name) Returns the subpackage of the specified name package.str
get-subpackages Returns all subpackages package.str
get-subsubpackage(ATerm names) Returns the direct or indirect subpackage of the given name package.str
get-toplevel-class(ATerm name) n/a package.str
get-toplevel-classes n/a package.str
get-toplevel-classtable n/a package.str
has-subpackage(ATerm name) Succeeds if this package has a subpackage 'name' package.str
has-toplevel-class(ATerm name) Succeeds if this package has a toplevel class of the specified name package.str
init-toplevel-bytecode-classes n/a package.str
instanceof-JavaPackage n/a package.str
is-root-package Succeeds if this is the root package package.str
is-subpackage(ATerm name) Alias of has-subpackage package.str
is-subsubpackage(ATerm names) n/a package.str
new-package(ATerm opt-parentpkg, ATerm simple-name) Creates a new package package.str
private-get-fully-qualified-name(ATerm acc) Private helper package.str
set-toplevel-bytecode-classes(ATerm data) n/a package.str



Constructor details


JavaPackage(ATerm )
File package.str
Author unknown
Since unknown
 

Identifier for the class Package.



 

Strategy details


ATerm add-subpackage(ATerm name)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm name String

Creates a new subpackage in the current package.Returns the package object of the new subpackage.


type Package Object -> Package Object

 
ATerm add-toplevel-class(ATerm class)
File package.str
Author unknown
Since unknown
 

No information available.


todo Set the package object of the class?
type Package Object -> Package Object

 
ATerm get-canonical-name
File package.str
Author unknown
Since unknown
 

Returns the canonical name of this package.


type Package Object -> TypeName

 
ATerm get-fully-qualified-name
File package.str
Author unknown
Since unknown
 

Returns the full qualified name of this package.


type Package Object -> TypeName

 
ATerm get-or-add-subpackage(ATerm name)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm name String

Ensures that a subpackage exists in the current package.


type Package Object -> Package Object

 
ATerm get-or-add-subsubpackage(ATerm names)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm names List(String)

Ensures that a subpackage exists in the current package.The subpackage can be multiple levels deep.

For example, in current package 'org' invoking thisstrategy with names ["foo", "bar"], will create a subpackage 'org.foo.bar'.


type Package Object -> Package Object

 
ATerm get-parent-package
File package.str
Author unknown
Since unknown
 

Returns the parent package.Fails if this is the root (default) package.


type Package Object -> Package Object

 
ATerm get-simple-name
File package.str
Author unknown
Since unknown
 

Returns the simple name of this package.i.e. package org.foo.bar will return "bar".


type Package Object -> String

 
ATerm get-subpackage(ATerm name)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm name Name of the package (String)

Returns the subpackage of the specified name.This strategy fails if there is no subpackage with this name.


type Package Object -> Package Object

 
ATerm get-subpackages
File package.str
Author unknown
Since unknown
 

Returns all subpackages.


type Package Object -> List(Package Object)

 
ATerm get-subsubpackage(ATerm names)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm names List(String)

Returns the direct or indirect subpackage of the given name.The subpackage can be multiple levels deep.

For example, in current package 'org' invoking thisstrategy with names ["foo", "bar"], will return thepackage 'org.foo.bar' (if this package exists).


type Package Object -> Package Object

 
ATerm get-toplevel-class(ATerm name)
File package.str
Author unknown
Since unknown
 

No information available.


type Package Object -> Class Object

 
ATerm get-toplevel-classes
File package.str
Author unknown
Since unknown
 

No information available.


type Package Object -> List(Class Object)

 
ATerm get-toplevel-classtable
File package.str
Author unknown
Since unknown
 

No information available.


type Package Object -> Hashtable(String, Class Object)

 
ATerm has-subpackage(ATerm name)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm name String

Succeeds if this package has a subpackage 'name'


type Package Object -> Package Object

 
ATerm has-toplevel-class(ATerm name)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm name Name of the class (String)

Succeeds if this package has a toplevel class of the specified name.


type Package Object -> Package Object

 
ATerm is-root-package
File package.str
Author unknown
Since unknown
 

Succeeds if this is the root package.


type Package Object -> Package Object

 
ATerm is-subpackage(ATerm name)
File package.str
Author unknown
Since unknown
 

Alias of has-subpackage.



 
ATerm is-subsubpackage(ATerm names)
File package.str
Author unknown
Since unknown
 

No information available.


type Package Object -> Package Object

 
ATerm new-package(ATerm opt-parentpkg, ATerm simple-name)
File package.str
Author unknown
Since unknown
 
Parameters
ATerm opt-parentpkg Optional parent (Some(Package Object))
ATerm simple-name Name of the package (String)

Creates a new package. If not parent package is specified, thenthe new package is a top level package.


type _ -> Package Object

 
ATerm private-get-fully-qualified-name(ATerm acc)
File package.str
Author unknown
Since unknown
 

Private helper. Don't invoke directly.


type Package Object -> List(Id)