org.jboss.test.visitor
Class PropertiesVisitorImpl
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertiesVisitorImpl
public PropertiesVisitorImpl()
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 mapname
- - the resource name to search formap
- - Map to populate
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.