org.apache.myfaces.orchestra.dynaForm.metadata.impl.ejb
Class AsmHelper

java.lang.Object
  extended by org.apache.myfaces.orchestra.dynaForm.metadata.impl.ejb.AsmHelper
All Implemented Interfaces:
ClassHelper

public class AsmHelper
extends Object
implements ClassHelper

Reimplement the reflection facilities provided by Class.class, but preserving the order in which the properties exist within the .class file.

Presumably the field order in the .class file is the same as the order they are declared within the source file. And presumably the code author arranged those in some logical order.

This class uses the ASM library to inspect the class data.


Constructor Summary
AsmHelper()
           
 
Method Summary
 Field[] getFields(Class<?> clazz)
          Return a list of all the static and non-static fields of the specified class, regardless of their accessability.
 Method[] getMethods(Class<?> clazz)
          Return a list of all the get*, set* and is* method on the specified class, regardless of their accessability.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsmHelper

public AsmHelper()
Method Detail

getFields

public Field[] getFields(Class<?> clazz)
Return a list of all the static and non-static fields of the specified class, regardless of their accessability.

The array order matches the order in which the fields were declared within the original source file.

Specified by:
getFields in interface ClassHelper

getMethods

public Method[] getMethods(Class<?> clazz)
Return a list of all the get*, set* and is* method on the specified class, regardless of their accessability.

The array order matches the order in which the methods were declared within the original source file.

Specified by:
getMethods in interface ClassHelper


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.