org.opcfoundation.ua.utils
Class ReflectionUtils

java.lang.Object
  extended by org.opcfoundation.ua.utils.ReflectionUtils

public class ReflectionUtils
extends Object

ReflectionUtils class.

Author:
Toni Kalajainen (toni.kalajainen@vtt.fi)

Constructor Summary
ReflectionUtils()
           
 
Method Summary
static Field[] getAllFields(Class<?> clazz)
          getAllFields.
static Method[] getAllMethods(Class<?> clazz)
          Returns all methods public, protected and private
static Class<?> getComponentClass(Class<?> clazz)
          getComponentClass.
static Class<?> getRespectiveArrayClass(Class<?> clazz)
          Get array version of a class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

getAllMethods

public static Method[] getAllMethods(Class<?> clazz)
Returns all methods public, protected and private

Parameters:
clazz - a Class object.
Returns:
all methods

getAllFields

public static Field[] getAllFields(Class<?> clazz)

getAllFields.

Parameters:
clazz - a Class object.
Returns:
an array of Field objects.

getRespectiveArrayClass

public static Class<?> getRespectiveArrayClass(Class<?> clazz)
Get array version of a class. E.g. Object -> Object[] Object[] -> Object[][]

Parameters:
clazz - a Class object.
Returns:
array class

getComponentClass

public static Class<?> getComponentClass(Class<?> clazz)

getComponentClass.

Parameters:
clazz - a Class object.
Returns:
a Class object.


Copyright © 2018. All rights reserved.