Update of /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16766/input/javasrc/biz/xsoftware/impl/mock
Modified Files:
Action.java MethodVerifier.java MessageHelper.java
BehaviorInfo.java
Log Message:
- Adding Apache License header
- Javadoc cleanup
Index: MethodVerifier.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock/MethodVerifier.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MethodVerifier.java 23 May 2008 19:06:04 -0000 1.6
--- MethodVerifier.java 11 Feb 2009 16:26:47 -0000 1.7
***************
*** 1,2 ****
--- 1,16 ----
+ /*
+ * Copyright 2009 mocklib.sourceforge.net
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package biz.xsoftware.impl.mock;
***************
*** 15,20 ****
/**
*
- * @author Dean Hiller, Brian Freeman
* @since May 21, 2007
*/
--- 29,39 ----
/**
+ * Contains several methods used to verify that method names given in
+ * {@link MockObject#expect(String)} and similar methods contain a name that
+ * actually exist.
+ *
+ * @author Dean Hiller
+ * @author Brian Freeman
*
* @since May 21, 2007
*/
***************
*** 22,25 ****
--- 41,47 ----
private static final Logger log = Logger.getLogger(MethodVerifier.class.getName());
+ /**
+ * Private to prevent creation of a static method class
+ */
private MethodVerifier() {
}
Index: Action.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock/Action.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Action.java 23 May 2008 19:06:01 -0000 1.3
--- Action.java 11 Feb 2009 16:26:47 -0000 1.4
***************
*** 1,6 ****
package biz.xsoftware.impl.mock;
!
public interface Action {
public Object execute(Object[] args) throws Throwable;
}
--- 1,29 ----
+ /*
+ * Copyright 2009 mocklib.sourceforge.net
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package biz.xsoftware.impl.mock;
! /**
! * Action to perform when a method is called
! */
public interface Action {
+ /**
+ * What to action to perform when the method is called
+ *
+ * @param args
+ * The arguments passed to the method
+ * @return The return from running the action
+ */
public Object execute(Object[] args) throws Throwable;
}
Index: BehaviorInfo.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock/BehaviorInfo.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** BehaviorInfo.java 23 May 2008 19:06:03 -0000 1.5
--- BehaviorInfo.java 11 Feb 2009 16:26:47 -0000 1.6
***************
*** 1,2 ****
--- 1,16 ----
+ /*
+ * Copyright 2009 mocklib.sourceforge.net
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package biz.xsoftware.impl.mock;
***************
*** 7,10 ****
--- 21,28 ----
import biz.xsoftware.mock.Behavior;
+ /**
+ * Contains a coorelation of the Behavior object and the cooresponding
+ * method to call when the MockObject method is called
+ */
public final class BehaviorInfo implements Action {
***************
*** 17,21 ****
private Method clonerMethod;
! protected BehaviorInfo(Behavior behavior, Method method) {
if (log.isLoggable(Level.FINEST)) {
log.finest("creating new : " + behavior + " : " + method.getName());
--- 35,50 ----
private Method clonerMethod;
! /**
! * Creates a coorelation of the behavior object and the method name to call
! * when this {@link Action} is executed
! *
! * @param behavior
! * The Behavior object to call the given method on
! *
! * @param method
! * The method in the behavior to call when this Action instance
! * is executed
! */
! protected BehaviorInfo(Behavior behavior, Method method) {
if (log.isLoggable(Level.FINEST)) {
log.finest("creating new : " + behavior + " : " + method.getName());
***************
*** 29,32 ****
--- 58,66 ----
}
+ /**
+ * Invokes the method specified for the given behavior.
+ *
+ * @see biz.xsoftware.impl.mock.Action#execute(java.lang.Object[])
+ */
public Object execute(Object[] args) throws Throwable {
try {
Index: MessageHelper.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock/MessageHelper.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MessageHelper.java 23 May 2008 19:06:04 -0000 1.6
--- MessageHelper.java 11 Feb 2009 16:26:47 -0000 1.7
***************
*** 1,2 ****
--- 1,16 ----
+ /*
+ * Copyright 2009 mocklib.sourceforge.net
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package biz.xsoftware.impl.mock;
***************
*** 8,13 ****
--- 22,33 ----
import biz.xsoftware.mock.CalledMethod;
+ /**
+ * Contains a couple helper methods for creating useful display messages
+ */
public final class MessageHelper {
+ /**
+ * Private to prevent creation of this static helper method class
+ */
private MessageHelper() {
}
|