|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.staccatocommons.dynamic.Dynamics
public class Dynamics
Class methods for creating simple Dynamics
| Constructor Summary | |
|---|---|
Dynamics()
|
|
| Method Summary | |
|---|---|
static Dynamic |
from(Object object)
Answers a new Dynamic wrapper for the given object, that
uses reflection to invoke methods, and property descriptors to get |
static Dynamic |
fromClass(Class<?> clazz)
Answer a new Dynamic that wraps a new instance of the given class |
static Dynamic |
fromClassName(String classname)
Answer a new Dynamic that wraps a new instance of a class for its
given classname |
static Dynamic |
null_()
Answers the null Dynamic, that is, a Dynamic that understands all
messages, by doing nothing and returning null. |
static Dynamic |
nullSafeFrom(Object object)
Answers a new Dynamic wrapper for the given object, if it
is not null, or null_()
otherwise |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dynamics()
| Method Detail |
|---|
@NonNull
public static Dynamic from(@NonNull
Object object)
Dynamic wrapper for the given object, that
uses reflection to invoke methods, and property descriptors to get
object -
Dynamic@NonNull public static Dynamic nullSafeFrom(Object object)
Dynamic wrapper for the given object, if it
is not null, or null_()
otherwise
object -
Dynamic, or null_(), if the object is null@Constant public static Dynamic null_()
Dynamic that understands all
messages, by doing nothing and returning null.
Its Dynamic.value() is null
public static Dynamic fromClassName(@NonNull
String classname)
Dynamic that wraps a new instance of a class for its
given classname
classname - the class name
InstantiationFailedException - if class can not be instantiated
@NonNull
public static Dynamic fromClass(@NonNull
Class<?> clazz)
Dynamic that wraps a new instance of the given class
clazz - the class to instantiate
InstantiationFailedException - if class can not be instantiated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||