org.apache.maven.diagrams.connectors.classes
Class DefaultClassNodesRepository

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.diagrams.connectors.classes.DefaultClassNodesRepository
All Implemented Interfaces:
ClassNodesRepository, org.codehaus.plexus.logging.LogEnabled

public class DefaultClassNodesRepository
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ClassNodesRepository

The class creates ClassNode objects for given class names. Translated objects are cached for feature asks.

Author:
Piotr Tabor

Field Summary
 
Fields inherited from interface org.apache.maven.diagrams.connectors.classes.ClassNodesRepository
ROLE
 
Constructor Summary
DefaultClassNodesRepository(ClassModelsRepository models, ClassesConnectorConfiguration a_configuration)
           
 
Method Summary
protected  ClassNode calculateClassNode(java.lang.String className)
          Does the real calculation of classNode from the className (fully qualified, dot separated)
 ClassNode getClassNode(java.lang.String className)
          The method checks if the classNode for given className ((fully qualified, dot separated) already exists (and returns it).
 java.util.Map<java.lang.String,ClassNode> getMap()
          Returns the current state of the cache (as a map from ClassName to ClassNode)
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClassNodesRepository

public DefaultClassNodesRepository(ClassModelsRepository models,
                                   ClassesConnectorConfiguration a_configuration)
Method Detail

getClassNode

public ClassNode getClassNode(java.lang.String className)
                       throws ClassDataSourceException
Description copied from interface: ClassNodesRepository
The method checks if the classNode for given className ((fully qualified, dot separated) already exists (and returns it). If not - the method calculates it and stores in the cache the result.

Specified by:
getClassNode in interface ClassNodesRepository
Throws:
ClassDataSourceException

getMap

public java.util.Map<java.lang.String,ClassNode> getMap()
Description copied from interface: ClassNodesRepository
Returns the current state of the cache (as a map from ClassName to ClassNode)

Specified by:
getMap in interface ClassNodesRepository
Returns:

calculateClassNode

protected ClassNode calculateClassNode(java.lang.String className)
                                throws ClassDataSourceException
Does the real calculation of classNode from the className (fully qualified, dot separated)

Parameters:
className -
Returns:
Throws:
ClassDataSourceException


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.