Skip to content

Commit

Permalink
set fields and fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
n9Mtq4 committed Sep 2, 2015
1 parent e804932 commit 14cec38
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/n9mtq4/reflection/EnhancedProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Created by will on 8/5/15 at 4:13 PM.<br>
* A Class that simplifies using Proxies.<br>
* NOTE: Some javadocs are oracles.
* NOTE: Some javadocs are oracle's.
*/
@SuppressWarnings("unused")
public class EnhancedProxy implements InvocationHandler, Serializable {
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/n9mtq4/reflection/ReflectionWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@ public <R> R getField(Field field) {
return getObject(field, object);
}

/**
* Sets a member field from the object.
*
* @param fieldName the field name
* @param newValue the new value of the field
*/
public <R> void setField(String fieldName, R newValue) {
setObject(newValue, fieldName, object);
}

/**
* Sets a member field from the object.
*
* @param field the field
* @param newValue the new value of the field
*/
public <R> void setField(Field field, R newValue) {
setObject(newValue, field, object);
}


/**
* Calls a member method from the object.
*
Expand Down

0 comments on commit 14cec38

Please sign in to comment.