org.jboss.test.visitor
Class PropertiesVisitorImpl

java.lang.Object
  extended by org.jboss.test.visitor.PropertiesVisitorImpl
All Implemented Interfaces:
TypeVisitor

public class PropertiesVisitorImpl
extends Object
implements TypeVisitor

A TypeVisitor which builds a map of type, method and field properties

Version:
$Revision: 56504 $
Author:
Scott.Stark@jboss.org

Constructor Summary
PropertiesVisitorImpl()
           
 
Method Summary
 HashMap<String,Properties> getFieldProperties()
           
 HashMap<String,Properties> getMethodProperties()
           
 HashMap<Class,Properties> getTypeProperties()
           
protected
<T> void
loadProperties(Class type, T key, String name, HashMap<T,Properties> map)
           
 void visitClass(Class type)
          Look for a properties file for the type using
 void visitFields(Field[] fields)
           
 void visitInterfaces(Class[] ifaces)
          Calls visitClass(i) for each ifaces[n]
 void visitMethods(Method[] methods)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesVisitorImpl

public PropertiesVisitorImpl()
Method Detail

getTypeProperties

public HashMap<Class,Properties> getTypeProperties()
Returns:
HashMap

getMethodProperties

public HashMap<String,Properties> getMethodProperties()
Returns:
HashMap

getFieldProperties

public HashMap<String,Properties> getFieldProperties()
Returns:
HashMap

visitClass

public void visitClass(Class type)
Look for a properties file for the type using

Specified by:
visitClass in interface TypeVisitor
Parameters:
type -

visitInterfaces

public void visitInterfaces(Class[] ifaces)
Calls visitClass(i) for each ifaces[n]

Specified by:
visitInterfaces in interface TypeVisitor
Parameters:
ifaces -

visitMethods

public void visitMethods(Method[] methods)
Specified by:
visitMethods in interface TypeVisitor

visitFields

public void visitFields(Field[] fields)
Specified by:
visitFields in interface TypeVisitor

loadProperties

protected <T> void loadProperties(Class type,
                                  T key,
                                  String name,
                                  HashMap<T,Properties> map)
Type Parameters:
T - the key type
Parameters:
type - - the class used to load the name resource via Class.getResource(name)
key - - the key into map
name - - the resource name to search for
map - - Map to populate


Copyright © 2004 JBoss Inc. All Rights Reserved.