tudresden.ocl.injection.ocl
Class SourceReflectionExtender
java.lang.Object
tudresden.ocl.injection.ocl.SourceReflectionExtender
- All Implemented Interfaces:
- ReflectionExtender
- public class SourceReflectionExtender
- extends Object
- implements ReflectionExtender
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. |
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.
SourceReflectionExtender
public SourceReflectionExtender()
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()
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.