public class AnnotationHelper extends Object
Modifier and Type | Field and Description |
---|---|
static Map<Class<?>,Class<?>> |
primitiveClassWrappers
Map of primitive data types to the object class supporting that type.
|
Constructor and Description |
---|
AnnotationHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
applyAnnotatedModelObject(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object modelObject,
boolean applyNullFields,
boolean offlineEnv,
String version,
Map<String,String> keywords)
Apply the annotated fields/setters in a model object to the current domain
using the provided WLST invoker.
|
static List<String> |
convertStringToList(String strValue) |
static Map<String,String> |
convertStringToMap(String strValue) |
static <T> T |
convertToType(Class<T> classType,
Object value)
Convert the value provided to the requested data type, if possible.
|
static void |
discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version)
Examine the passed target class and populate annotated fields with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
boolean keyFields)
Examine the passed target class and populate annotated fields with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
Map<String,String> paramAndTokenMap)
Examine the passed target class and populate annotated fields with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
Map<String,String> paramAndTokenMap,
boolean keyFields)
Examine the passed target class and populate annotated fields with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
Map<String,String> paramAndTokenMap,
boolean keyFields,
Map<String,Map<String,String>> pathCache)
Examine the passed target class and populate annotated fields with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version)
Examine the passed target class and invokes the annotated setter methods with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
boolean keyFields)
Examine the passed target class and invoke the annotated setter methods with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
Map<String,String> paramAndTokenMap)
Examine the passed target class and invoke the annotated setter methods with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
Map<String,String> paramAndTokenMap,
boolean keyFields)
Examine the passed target class and invoke the annotated setter methods with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static void |
discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker,
Object target,
boolean offlineEnv,
String version,
Map<String,String> paramAndTokenMap,
boolean keyFields,
Map<String,Map<String,String>> pathCache)
Examine the passed target class and invoke the annotated setter methods with values from
the current environment defined by he passed EmbeddedWLSTInvoker.
|
static List<Field> |
getAnnotatedFields(Class<? extends Annotation> annotation,
Class annotatedClass) |
static Field |
getField(String fieldName,
Object fromObject)
Returns the field from the given object if one exists with the given fieldName
|
static Object |
getFieldValue(Field field,
Object fromObject) |
static void |
setFieldValue(Field field,
Object target,
Object fieldValue) |
public static void discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, Map<String,String> paramAndTokenMap) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.paramAndTokenMap
- map of tokens to be used for replacement.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, Map<String,String> paramAndTokenMap) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.paramAndTokenMap
- map of tokens to be used for replacement.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, boolean keyFields) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.keyFields
- if true only files annotated as key fields will be updated.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, boolean keyFields) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.keyFields
- if true only files annotated as key fields will be updated.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, Map<String,String> paramAndTokenMap, boolean keyFields) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute values.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.paramAndTokenMap
- map of tokens to be used for replacement.keyFields
- if true only files annotated as akey fields will be updated.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, Map<String,String> paramAndTokenMap, boolean keyFields) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.paramAndTokenMap
- map of tokens to be used for replacement.keyFields
- if true only files annotated as akey fields will be updated.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedAttributes(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, Map<String,String> paramAndTokenMap, boolean keyFields, Map<String,Map<String,String>> pathCache) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.paramAndTokenMap
- map of tokens to be used for replacement.keyFields
- if true only files annotated as akey fields will be updated.pathCache
- attribute cache to be used for discovery.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static void discoverAnnotatedSetters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object target, boolean offlineEnv, String version, Map<String,String> paramAndTokenMap, boolean keyFields, Map<String,Map<String,String>> pathCache) throws FMWEnvSpecException
invoker
- the WLST environment to use in obtaining attribute valuers.target
- the target object to be examined for annotations.offlineEnv
- true if running in offline mode, false otherwise.version
- the version of alias to be used.paramAndTokenMap
- map of tokens to be used for replacement.keyFields
- if true only files annotated as akey fields will be updated.pathCache
- attribute cache to be used for discovery.FMWEnvSpecException
- if the version passed is invalid or an error occurs retrieving the attributes.public static List<Field> getAnnotatedFields(Class<? extends Annotation> annotation, Class annotatedClass)
public static void applyAnnotatedModelObject(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker invoker, Object modelObject, boolean applyNullFields, boolean offlineEnv, String version, Map<String,String> keywords) throws FMWEnvSpecException
invoker
- the WLST invoker to be used for updatesmodelObject
- the model object to use as source of dataapplyNullFields
- if true null fields will be applied (special rules)offlineEnv
- true if the operation is being performed in offline modeversion
- the WLS version hosting the domainkeywords
- tokens used to substitute alias path entriesFMWEnvSpecException
- if an error occurspublic static Field getField(String fieldName, Object fromObject)
fieldName
- name of the field to get from target objectfromObject
- object whose class to look into for the given fieldNamepublic static <T> T convertToType(Class<T> classType, Object value)
classType
- the Class that value will be converted to.value
- the data to be converted.IllegalArgumentException
- if classType is a primitive class type such as int, short, ...