• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PropertyUtils

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello at the Ranch:

I have a simple question regarding PropertyUtils --> PropertyDescriptors


Please consider the code below:
It produces the following output:
After you get the classpath correct. fun fun fun

Hello from TestPropUtil
propDesc.length: 7

propName: class
propType: class java.lang.Class

propName: dressName
propType: class java.lang.String

propName: dressPartCodes
propType: class [Ljava.lang.String;

propName: dressPartNames
propType: class java.util.HashMap

propName: dressSampleArrived
propType: class java.util.Date

propName: dressSampleOrdered
propType: class java.lang.Integer

propName: dressType
propType: class java.lang.String


In the above output what is the propName: class related to the class Dress "as a whole".
More important this:
propName: dressPartCodes
propType: class [Ljava.lang.String;
The property type in the class definition is String[], this kinda gave me pause.
Not what I was expecting. Can someone take a shot at explaining [Ljava.lang.String;

Many thanks for your kind assistance.


KD









 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kevind duff wrote:In the above output what is the propName: class related to the class Dress "as a whole".


I don't know what that means. Can you try to ask it again in a different way?

Can someone take a shot at explaining [Ljava.lang.String;


That is the way String[] is written as a type. The [L means "array of type" then the java.lang.String provides the type of data held in the array.
 
reply
    Bookmark Topic Watch Topic
  • New Topic