runtime - Inspect Groovy object properties with Java reflection -


i have expando class need inspect properties java. in groovy:

def worker = new expando() worker.name = "john" worker.surname = "doe" 

in java:

introspector.getbeaninfo(groovyobject.getclass()) 

is possible compile @ runtime class object in groovy?

the expando dynamic. not generate bytecode getters or setters , therefore cannot used javabean. need use bean introspector for? may able implement logic using expando directly if write in groovy.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -