test_class.declarator: number
test_class.modifier: private
test_class.original_string: private int number;
test_class.type: int
test_class.var_name: number
test_class.declarator: text
test_class.modifier: private
test_class.original_string: private String text, writeOnly;
test_class.type: String
test_class.var_name: text
test_class.declarator: flag
test_class.modifier: private
test_class.original_string: private boolean flag;
test_class.type: boolean
test_class.var_name: flag
test_class.declarator: inner
test_class.modifier: private
test_class.original_string: private Inner inner;
test_class.type: Inner
test_class.var_name: inner
test_class.declarator: nacked
test_class.modifier: private
test_class.original_string: private Nacked nacked;
test_class.type: Nacked
test_class.var_name: nacked
test_class.declarator: nulli
test_class.modifier: private
test_class.original_string: private Object nulli;
test_class.type: Object
test_class.var_name: nulli
test_class.declarator: self
test_class.modifier: private
test_class.original_string: private BeanExtractorTest self;
test_class.type: BeanExtractorTest
test_class.var_name: self
test_class.declarator: hiddenSelf
test_class.modifier: private
test_class.original_string: private BeanExtractorTest hiddenSelf;
test_class.type: BeanExtractorTest
test_class.var_name: hiddenSelf
test_class.declarator: hiddenInner
test_class.modifier: private
test_class.original_string: private Inner hiddenInner;
test_class.type: Inner
test_class.var_name: hiddenInner
test_class.file: agent/core/src/test/java/org/jolokia/converter/json/BeanExtractorTest.java
test_class.identifier: BeanExtractorTest
test_class.superclass: extends AbstractExtractorTest
test_case.body: @Test
      public void simple() throws AttributeNotFoundException {
          JSONObject res = (JSONObject) extractJson(this);
          assertEquals(res.get("number"),10);
          assertEquals(res.get("text"),"Test");
          assertFalse((Boolean) res.get("flag"));
          assertEquals( ((JSONObject) res.get("inner")).get("innerText"),"innerValue");
          assertNull(res.get("nulli"));
          assertTrue(!res.containsKey("forbiddenStream"));
          assertTrue(res.containsKey("nulli"));
          assertEquals(res.get("nacked"),"nacked object");
          assertEquals(res.get("self"),"[this]");
  
          JSONObject inner = (JSONObject) extractJson(this,"inner");
          assertEquals(inner.get("innerText"),"innerValue");
  
          JSONObject innerWithWildcardPath = (JSONObject) extractJson(this,null,"innerDate");
          assertEquals(innerWithWildcardPath.size(),1);
          assertTrue((Long) ((JSONObject) innerWithWildcardPath.get("inner")).get("millis") <= new Date().getTime());
  
          BeanExtractorTest test = (BeanExtractorTest) extractObject(this);
          assertEquals(test,this);
  
          Date date = (Date) extractObject(this,"inner","innerDate");
          assertTrue(date.getTime() <= new Date().getTime());
  
      }
test_case.class_method_signature: BeanExtractorTest.simple()
test_case.full_signature: @Test public void simple()
test_case.identifier: simple
test_case.invocations: extractJson assertEquals get assertEquals get assertFalse get assertEquals get get assertNull get assertTrue containsKey assertTrue containsKey assertEquals get assertEquals get extractJson assertEquals get extractJson assertEquals size assertTrue get get getTime extractObject assertEquals extractObject assertTrue getTime getTime
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void simple()
focal_class.declarator: FINAL_CLASSES = new HashSet<Class>(Arrays.asList(
              String.class,
              Number.class,
              Byte.class,
              Double.class,
              Float.class,
              Long.class,
              Short.class,
              Integer.class,
              Boolean.class
      ))
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Class> FINAL_CLASSES = new HashSet<Class>(Arrays.asList(
              String.class,
              Number.class,
              Byte.class,
              Double.class,
              Float.class,
              Long.class,
              Short.class,
              Integer.class,
              Boolean.class
      ));
focal_class.type: Set<Class>
focal_class.var_name: FINAL_CLASSES
focal_class.declarator: IGNORE_METHODS = new HashSet<String>(Arrays.asList(
              "getClass",
              // Ommit internal stuff
              "getStackTrace",
              "getClassLoader"
      ))
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> IGNORE_METHODS = new HashSet<String>(Arrays.asList(
              "getClass",
              // Ommit internal stuff
              "getStackTrace",
              "getClassLoader"
      ));
focal_class.type: Set<String>
focal_class.var_name: IGNORE_METHODS
focal_class.declarator: IGNORED_RETURN_TYPES = new Class[]{
              OutputStream.class,
              Writer.class
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Class[] IGNORED_RETURN_TYPES = new Class[]{
              OutputStream.class,
              Writer.class
      };
focal_class.type: Class[]
focal_class.var_name: IGNORED_RETURN_TYPES
focal_class.declarator: GETTER_PREFIX = new String[]{"get", "is", "has"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] GETTER_PREFIX = new String[]{"get", "is", "has"};
focal_class.type: String[]
focal_class.var_name: GETTER_PREFIX
focal_class.file: agent/core/src/main/java/org/jolokia/converter/json/BeanExtractor.java
focal_class.identifier: BeanExtractor
focal_class.interfaces: implements Extractor
focal_class.class_method_signature: BeanExtractor.getType()
focal_class.full_signature: public Class getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Class
focal_class.signature: Class getType()
focal_class.class_method_signature: BeanExtractor.extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_class.full_signature: @SuppressWarnings("PMD.CompareObjectsWithEquals") public Object extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_class.identifier: extractObject
focal_class.modifiers: @SuppressWarnings("PMD.CompareObjectsWithEquals") public
focal_class.parameters: (ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_class.return: Object
focal_class.signature: Object extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_class.class_method_signature: BeanExtractor.setObjectValue(StringToObjectConverter pConverter,Object pInner, String pAttribute, Object pValue)
focal_class.full_signature: public Object setObjectValue(StringToObjectConverter pConverter,Object pInner, String pAttribute, Object pValue)
focal_class.identifier: setObjectValue
focal_class.modifiers: public
focal_class.parameters: (StringToObjectConverter pConverter,Object pInner, String pAttribute, Object pValue)
focal_class.return: Object
focal_class.signature: Object setObjectValue(StringToObjectConverter pConverter,Object pInner, String pAttribute, Object pValue)
focal_class.class_method_signature: BeanExtractor.canSetValue()
focal_class.full_signature: public boolean canSetValue()
focal_class.identifier: canSetValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean canSetValue()
focal_class.class_method_signature: BeanExtractor.exctractJsonifiedValue(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts)
focal_class.full_signature: private Object exctractJsonifiedValue(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts)
focal_class.identifier: exctractJsonifiedValue
focal_class.modifiers: private
focal_class.parameters: (ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts)
focal_class.return: Object
focal_class.signature: Object exctractJsonifiedValue(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts)
focal_class.class_method_signature: BeanExtractor.extractBeanValues(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts, List<String> pAttributes)
focal_class.full_signature: private Object extractBeanValues(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts, List<String> pAttributes)
focal_class.identifier: extractBeanValues
focal_class.modifiers: private
focal_class.parameters: (ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts, List<String> pAttributes)
focal_class.return: Object
focal_class.signature: Object extractBeanValues(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts, List<String> pAttributes)
focal_class.class_method_signature: BeanExtractor.extractJsonifiedPropertyValue(ObjectToJsonConverter pConverter, Object pValue, String pAttribute, Stack<String> pPathParts)
focal_class.full_signature: @SuppressWarnings("PMD.CompareObjectsWithEquals") private Object extractJsonifiedPropertyValue(ObjectToJsonConverter pConverter, Object pValue, String pAttribute, Stack<String> pPathParts)
focal_class.identifier: extractJsonifiedPropertyValue
focal_class.modifiers: @SuppressWarnings("PMD.CompareObjectsWithEquals") private
focal_class.parameters: (ObjectToJsonConverter pConverter, Object pValue, String pAttribute, Stack<String> pPathParts)
focal_class.return: Object
focal_class.signature: Object extractJsonifiedPropertyValue(ObjectToJsonConverter pConverter, Object pValue, String pAttribute, Stack<String> pPathParts)
focal_class.class_method_signature: BeanExtractor.extractBeanAttributes(Object pValue)
focal_class.full_signature: private List<String> extractBeanAttributes(Object pValue)
focal_class.identifier: extractBeanAttributes
focal_class.modifiers: private
focal_class.parameters: (Object pValue)
focal_class.return: List<String>
focal_class.signature: List<String> extractBeanAttributes(Object pValue)
focal_class.class_method_signature: BeanExtractor.hasAnnotation(Method method, String annotation)
focal_class.full_signature: private boolean hasAnnotation(Method method, String annotation)
focal_class.identifier: hasAnnotation
focal_class.modifiers: private
focal_class.parameters: (Method method, String annotation)
focal_class.return: boolean
focal_class.signature: boolean hasAnnotation(Method method, String annotation)
focal_class.class_method_signature: BeanExtractor.addAttributes(List<String> pAttrs, Method pMethod)
focal_class.full_signature: @SuppressWarnings("PMD.UnnecessaryCaseChange") private void addAttributes(List<String> pAttrs, Method pMethod)
focal_class.identifier: addAttributes
focal_class.modifiers: @SuppressWarnings("PMD.UnnecessaryCaseChange") private
focal_class.parameters: (List<String> pAttrs, Method pMethod)
focal_class.return: void
focal_class.signature: void addAttributes(List<String> pAttrs, Method pMethod)
focal_class.class_method_signature: BeanExtractor.extractBeanPropertyValue(Object pValue, String pAttribute, ValueFaultHandler pFaultHandler)
focal_class.full_signature: private Object extractBeanPropertyValue(Object pValue, String pAttribute, ValueFaultHandler pFaultHandler)
focal_class.identifier: extractBeanPropertyValue
focal_class.modifiers: private
focal_class.parameters: (Object pValue, String pAttribute, ValueFaultHandler pFaultHandler)
focal_class.return: Object
focal_class.signature: Object extractBeanPropertyValue(Object pValue, String pAttribute, ValueFaultHandler pFaultHandler)
focal_class.class_method_signature: BeanExtractor.isIgnoredType(Class<?> pReturnType)
focal_class.full_signature: private boolean isIgnoredType(Class<?> pReturnType)
focal_class.identifier: isIgnoredType
focal_class.modifiers: private
focal_class.parameters: (Class<?> pReturnType)
focal_class.return: boolean
focal_class.signature: boolean isIgnoredType(Class<?> pReturnType)
focal_method.body: @SuppressWarnings("PMD.CompareObjectsWithEquals")
      public Object extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
              throws AttributeNotFoundException {
          // Wrap fault handler if a wildcard path pattern is present
          ValueFaultHandler faultHandler = pConverter.getValueFaultHandler();
          String pathPart = pPathParts.isEmpty() ? null : pPathParts.pop();
          if (pathPart != null) {
              // Still some path elements available, so dive deeper
              Object attributeValue = extractBeanPropertyValue(pValue, pathPart, faultHandler);
              return pConverter.extractObject(attributeValue, pPathParts, jsonify);
          } else {
              if (jsonify) {
                  // We need the jsonfied value from here on.
                  return exctractJsonifiedValue(pConverter, pValue, pPathParts);
              } else {
                  // No jsonification requested, hence we are returning the object itself
                  return pValue;
              }
          }
      }
focal_method.class_method_signature: BeanExtractor.extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_method.full_signature: @SuppressWarnings("PMD.CompareObjectsWithEquals") public Object extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_method.identifier: extractObject
focal_method.invocations: getValueFaultHandler isEmpty pop extractBeanPropertyValue extractObject exctractJsonifiedValue
focal_method.modifiers: @SuppressWarnings("PMD.CompareObjectsWithEquals") public
focal_method.parameters: (ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)
focal_method.return: Object
focal_method.signature: Object extractObject(ObjectToJsonConverter pConverter, Object pValue,
                                  Stack<String> pPathParts, boolean jsonify)