title: java reflection get specific declared field value as String
body: <p>I am having a declared field in RequestDto as (requestDto has many declared field but i want only this custom field)</p>
  
  <pre><code>private String custom; 
  </code></pre>
  
  <p>i wanted to get this declared field name Custom as String</p>
  
  <p>like <code>String name-"custom"(but custom has to be dynamic)</code></p>
  
  <p>The solution has to be without modifying default getters and setters  </p>
  
  <p>Actually i have a problem like   when a requestDto is processed for content validation if one of the field in the request Dto is having an bad data i should provide an error message along with the field name as string which had an irrelevant data</p>
  
  <p>The problem is when custom field is modified in RequestDto in future ,the person modifying it will not even be knowing that custom field is set as string and it is used ,so i wanted to have the custom field name as string from RequestDto only ,so when ever the field value is changed i get the changed name in string</p>