Dresden OCL Toolkit

tudresden.ocl.injection.ocl
Class SourceReflectionExtender

java.lang.Object
  extended bytudresden.ocl.injection.ocl.SourceReflectionExtender
All Implemented Interfaces:
ReflectionExtender

public class SourceReflectionExtender
extends Object
implements ReflectionExtender


Nested Class Summary
(package private)  class SourceReflectionExtender.ReflectionConsumer
           
 
Field Summary
private  HashMap elementtypes
          Maps from java.lang.reflect.Field to java.lang.Class.
private  HashMap keytypes
          Maps from java.lang.reflect.Field to java.lang.Class.
private  HashSet parsedclasses
          Contains all classes, for which the source code has been attempted to parse.
 
Constructor Summary
SourceReflectionExtender()
           
 
Method Summary
private  void checkField(Field field)
           
 Class getElementType(Field field)
          Returns the element type of the given class attribute.
 Class getKeyType(Field field)
          Returns the key type of the given class attribute.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elementtypes

private HashMap elementtypes
Maps from java.lang.reflect.Field to java.lang.Class. This is the cache for getElementType.

See Also:
getElementType(java.lang.reflect.Field)

keytypes

private HashMap keytypes
Maps from java.lang.reflect.Field to java.lang.Class. This is the cache for getKeyType.

See Also:
getKeyType(java.lang.reflect.Field)

parsedclasses

private HashSet parsedclasses
Contains all classes, for which the source code has been attempted to parse. Serves as negative cache for source code or @elementtype tags not found.

Constructor Detail

SourceReflectionExtender

public SourceReflectionExtender()
Method Detail

getElementType

public Class getElementType(Field field)
Description copied from interface: ReflectionExtender
Returns the element type of the given class attribute. Makes sense for container attributes only, such as java.util.Collections. The implementer should search for additional information, which is not available through the reflection api. Returns null, if no additional information is available.

Specified by:
getElementType in interface ReflectionExtender

getKeyType

public Class getKeyType(Field field)
Description copied from interface: ReflectionExtender
Returns the key type of the given class attribute. Makes sense for qualified container attributes only, such as java.util.Map. The implementer should search for additional information, which is not available through the reflection api. Returns null, if no additional information is available.

Specified by:
getKeyType in interface ReflectionExtender

checkField

private void checkField(Field field)

toString

public String toString()

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.