Package org.terracotta.context.extractor
Class ObjectContextExtractor
java.lang.Object
org.terracotta.context.extractor.ObjectContextExtractor
Extracts context information from object instances and creates appropriate
enclosing
ContextElement instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static AttributeGetter<Object>createFieldAttributeGetter(Object from, Field f) static ContextElementReturns aContextElementinstance for the supplied object.private static Map<String,AttributeGetter<Object>> extractFieldAttributes(Object from) private static Map<? extends String,? extends AttributeGetter<Object>> private static Map<String,AttributeGetter<Object>>
-
Constructor Details
-
ObjectContextExtractor
private ObjectContextExtractor()
-
-
Method Details
-
extract
Returns aContextElementinstance for the supplied object.The supplied object's class type is parsed for
ContextAttributeannotations and the associated attributes are extracted and returned in the form of aContextElement.- Parameters:
from- object to extract context for- Returns:
- a
ContextElement
-
extractInstanceAttribute
private static Map<? extends String,? extends AttributeGetter<Object>> extractInstanceAttribute(Object from) -
extractMethodAttributes
-
extractFieldAttributes
-
createFieldAttributeGetter
-