setter = resourceClass.getMethod("set"+StringUtils.capitalize(value), type);
if(type.getName().startsWith("java.lang") || "boolean".equals(type.getName()) || "long".equals(type.getName()) || "int".equals(type.getName())) {
try {
- setter.setAccessible(true);
Object arglist[] = new Object[1];
arglist[0] = params.get(id);
Method method = getters.get(attribute);
if(method != null) {
try {
- method.setAccessible(true);
Object arglist[] = new Object[0];
// arglist[0] = value;
Class<?>[] types = method.getParameterTypes();
if(getRelationshipListMethod != null){
try {
- getRelationshipListMethod.setAccessible(true);
obj = getRelationshipListMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
Method setRelationshipListMethod = resourceClass.getMethod("setRelationshipList", RelationshipList.class);
if(setRelationshipListMethod != null){
try {
- setRelationshipListMethod.setAccessible(true);
Object arglist[] = new Object[1];
arglist[0] = relationshipList;
Method getVLansMethod = resourceClass.getMethod("getVlans");
if(getVLansMethod != null){
try {
- getVLansMethod.setAccessible(true);
obj = getVLansMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
Method setVlansMethod = resourceClass.getMethod("setVlans", Vlans.class);
if(setVlansMethod != null){
try {
- setVlansMethod.setAccessible(true);
Object arglist[] = new Object[1];
arglist[0] = vlanList;
Method getMetadataMethod = resourceClass.getMethod("getMetadata");
if(getMetadataMethod != null){
try {
- getMetadataMethod.setAccessible(true);
obj = getMetadataMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
Method setMetadataMethod = resourceClass.getMethod("setMetadata", Metadata.class);
if(setMetadataMethod != null){
try {
- setMetadataMethod.setAccessible(true);
Object arglist[] = new Object[1];
arglist[0] = metadataList;
}
if(getRelationshipListMethod != null){
try {
- getRelationshipListMethod.setAccessible(true);
obj = getRelationshipListMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
Method setRelationshipListMethod = resourceClass.getMethod("setRelationshipList", RelationshipList.class);
if(setRelationshipListMethod != null){
try {
- setRelationshipListMethod.setAccessible(true);
Object arglist[] = new Object[1];
arglist[0] = relationshipList;
Method getMetadataMethod = resourceClass.getMethod("getMetadata");
if(getMetadataMethod != null){
try {
- getMetadataMethod.setAccessible(true);
obj = getMetadataMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
Method setMetadataMethod = resourceClass.getMethod("setMetadata", Metadata.class);
if(setMetadataMethod != null){
try {
- setMetadataMethod.setAccessible(true);
setMetadataMethod.invoke(instance, metadata);
} catch (InvocationTargetException x) {
}
Method getResourceVersionMethod = resourceClass.getMethod("getResourceVersion");
if(getResourceVersionMethod != null){
try {
- getResourceVersionMethod.setAccessible(true);
Object object = getResourceVersionMethod.invoke(instance);
if(object != null)
resourceVersion = object.toString();
}
if(getRelationshipListMethod != null){
try {
- getRelationshipListMethod.setAccessible(true);
obj = getRelationshipListMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();
Method getResourceVersionMethod = resourceClass.getMethod("getResourceVersion");
if(getResourceVersionMethod != null){
try {
- getResourceVersionMethod.setAccessible(true);
resourceVersion = (String) getResourceVersionMethod.invoke(instance);
} catch (InvocationTargetException x) {
}
Method getMetadataMethod = resourceClass.getMethod("getMetadata");
if(getMetadataMethod != null){
try {
- getMetadataMethod.setAccessible(true);
obj = getMetadataMethod.invoke(instance);
} catch (InvocationTargetException x) {
Throwable cause = x.getCause();