com.kuka.nav.fleet.graph.properties
Class EditableParameterAccess

java.lang.Object
  extended by com.kuka.nav.fleet.graph.properties.EditableParameterAccess

public final class EditableParameterAccess
extends Object

Static class to access fields annotated with EditableParameter of arbitrary objects.


Nested Class Summary
static class EditableParameterAccess.Accessor
          Class to access a specific field that has been annotated with EditableParameter of a specific class.
 
Method Summary
static Object constructObject(Class<?> c)
          Helper function to construct an object of arbitrary type with its parameterless constructor.
static List<EditableParameterAccess.Accessor> getAccessors(Class<? extends Property> c)
          Returns one accessor for each field annotated with EditableParameter in a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

constructObject

public static Object constructObject(Class<?> c)
Helper function to construct an object of arbitrary type with its parameterless constructor.

Parameters:
c - a class with a parameterless constructor
Returns:
an instance of class c, resulting from calling the parameterless constructor or null if calling the constructor failed

getAccessors

public static List<EditableParameterAccess.Accessor> getAccessors(Class<? extends Property> c)
Returns one accessor for each field annotated with EditableParameter in a given class. Each accessor can be used to read and write a single editable parameter of the given class.

Parameters:
c - a class
Returns:
a list of accessors, one for each editable parameter or an empty list if the class has no such fields


Copyright © 2019. All rights reserved.