org.argouml.uml.reveng.java
Class Context

java.lang.Object
  extended byorg.argouml.uml.reveng.java.Context
Direct Known Subclasses:
ClassifierContext, OuterClassifierContext, PackageContext

abstract class Context
extends Object

The context is the current available namespaces via import in the class that is currently parsed. It is non mutable and a new context can be based on the current context with an additional namespace.


Field Summary
private  Context context
          The succeding context.
 
Constructor Summary
Context(Context base)
          Create a new context.
 
Method Summary
abstract  Object get(String name)
          Get a classifier from the model.
protected  Context getContext()
           
abstract  Object getInterface(String name)
           
protected  String getJavaName(Object mPackage)
          Get the complete java name for a package.
protected  void setContext(Context c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private Context context
The succeding context. May be null.

Constructor Detail

Context

public Context(Context base)
Create a new context.

Parameters:
base - Based on this context, may be null.
Method Detail

get

public abstract Object get(String name)
                    throws ClassifierNotFoundException
Get a classifier from the model. If it is not in the model, try to find it with the CLASSPATH. If found, in the classpath, the classifier is created and added to the model. If not found at all, a datatype is created and added to the model.

Parameters:
name - The name of the classifier to find.
Returns:
Found classifier.
Throws:
ClassifierNotFoundException

getInterface

public abstract Object getInterface(String name)
                             throws ClassifierNotFoundException
Throws:
ClassifierNotFoundException

getJavaName

protected String getJavaName(Object mPackage)
Get the complete java name for a package.

Parameters:
mPackage - The package.
Returns:
Package name in java format

setContext

protected void setContext(Context c)
Parameters:
c - The context to set.

getContext

protected Context getContext()
Returns:
Returns the context.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook