Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory usw-pr-cvs1:/tmp/cvs-serv15906/src/org/webmacro/engine Modified Files: DebugEvaluationExceptionHandler.java IntrospectionUtils.java MethodWrapper.java StaticClassWrapper.java VoidMacro.java Log Message: - adding copyright headers where they were missing - fix a few import statements - minor javadoc cleanup here and there - used IDEA to find and fix redundant type casts and unused assignments. Index: DebugEvaluationExceptionHandler.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/DebugEvaluationExceptionHandler.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DebugEvaluationExceptionHandler.java 17 Jul 2002 07:34:12 -0000 1.6 --- DebugEvaluationExceptionHandler.java 11 Nov 2002 19:22:37 -0000 1.7 *************** *** 129,133 **** } // and rethrow it ! throw (PropertyException) propEx; } --- 129,133 ---- } // and rethrow it ! throw propEx; } Index: IntrospectionUtils.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/IntrospectionUtils.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IntrospectionUtils.java 15 Jun 2002 05:53:46 -0000 1.1 --- IntrospectionUtils.java 11 Nov 2002 19:22:37 -0000 1.2 *************** *** 1,8 **** /* ! * IntrospectionUtils.java * ! * Created on May 25, 2002, 5:42 PM */ - package org.webmacro.engine; --- 1,23 ---- /* ! * Copyright (C) 1998-2000 Semiotek Inc. All Rights Reserved. * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted under the terms of either of the following ! * Open Source licenses: ! * ! * The GNU General Public License, version 2, or any later version, as ! * published by the Free Software Foundation ! * (http://www.fsf.org/copyleft/gpl.html); ! * ! * or ! * ! * The Semiotek Public License (http://webmacro.org/LICENSE.) ! * ! * This software is provided "as is", with NO WARRANTY, not even the ! * implied warranties of fitness to purpose, or merchantability. You ! * assume all risks and liabilities associated with its use. ! * ! * See www.webmacro.org for more information on the WebMacro project. */ package org.webmacro.engine; *************** *** 10,13 **** --- 25,29 ---- * * @author Keats + * @since May 25, 2002 */ public class IntrospectionUtils { *************** *** 73,77 **** // try each constructor with the right number of args, // untill one works or all have failed - Exception lastException = null; java.lang.reflect.Constructor[] cons = c.getConstructors(); for (int i=0; i<cons.length; i++){ --- 89,92 ---- *************** *** 82,86 **** break; // if successful, we're done! } catch (Exception e){ ! lastException = e; } } --- 97,101 ---- break; // if successful, we're done! } catch (Exception e){ ! } } Index: MethodWrapper.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/MethodWrapper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MethodWrapper.java 15 Jun 2002 05:53:17 -0000 1.1 --- MethodWrapper.java 11 Nov 2002 19:22:37 -0000 1.2 *************** *** 1,15 **** /* ! * MethodWrapper.java * ! * Created on May 24, 2002, 12:01 AM */ - package org.webmacro.engine; import java.lang.reflect.Method; import org.webmacro.*; ! import java.io.IOException; /** * * @author Keats */ public class MethodWrapper { --- 1,31 ---- /* ! * Copyright (C) 1998-2000 Semiotek Inc. All Rights Reserved. * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted under the terms of either of the following ! * Open Source licenses: ! * ! * The GNU General Public License, version 2, or any later version, as ! * published by the Free Software Foundation ! * (http://www.fsf.org/copyleft/gpl.html); ! * ! * or ! * ! * The Semiotek Public License (http://webmacro.org/LICENSE.) ! * ! * This software is provided "as is", with NO WARRANTY, not even the ! * implied warranties of fitness to purpose, or merchantability. You ! * assume all risks and liabilities associated with its use. ! * ! * See www.webmacro.org for more information on the WebMacro project. */ package org.webmacro.engine; import java.lang.reflect.Method; import org.webmacro.*; ! /** * * @author Keats + * @since May 24, 2002 */ public class MethodWrapper { *************** *** 60,64 **** Class[] types = IntrospectionUtils.createTypesFromArgs(args); for (int i = 0; i < _methods.length; i++){ ! Method m = (Method) _methods[i]; Class[] sig = m.getParameterTypes(); if (IntrospectionUtils.matches(sig,types)) { --- 76,80 ---- Class[] types = IntrospectionUtils.createTypesFromArgs(args); for (int i = 0; i < _methods.length; i++){ ! Method m = _methods[i]; Class[] sig = m.getParameterTypes(); if (IntrospectionUtils.matches(sig,types)) { Index: StaticClassWrapper.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/StaticClassWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StaticClassWrapper.java 11 Jun 2002 17:43:22 -0000 1.2 --- StaticClassWrapper.java 11 Nov 2002 19:22:37 -0000 1.3 *************** *** 1,8 **** /* ! * StaticClassWrapper.java * ! * Created on June 1, 2001, 12:25 PM */ - package org.webmacro.engine; --- 1,23 ---- /* ! * Copyright (C) 1998-2000 Semiotek Inc. All Rights Reserved. * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted under the terms of either of the following ! * Open Source licenses: ! * ! * The GNU General Public License, version 2, or any later version, as ! * published by the Free Software Foundation ! * (http://www.fsf.org/copyleft/gpl.html); ! * ! * or ! * ! * The Semiotek Public License (http://webmacro.org/LICENSE.) ! * ! * This software is provided "as is", with NO WARRANTY, not even the ! * implied warranties of fitness to purpose, or merchantability. You ! * assume all risks and liabilities associated with its use. ! * ! * See www.webmacro.org for more information on the WebMacro project. */ package org.webmacro.engine; *************** *** 12,15 **** --- 27,31 ---- * @author keats_kirsch * @version + * @since June 1, 2001 */ final public class StaticClassWrapper { Index: VoidMacro.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/VoidMacro.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** VoidMacro.java 11 Jun 2002 17:43:22 -0000 1.4 --- VoidMacro.java 11 Nov 2002 19:22:37 -0000 1.5 *************** *** 38,45 **** /** ! * Returns null. ! * ! * @return null ! * @exception PropertyException if required data was missing from context */ public Object evaluate(Context context) --- 38,42 ---- /** ! * Always throws a new <code>PropertyException.VoidValueException</code> */ public Object evaluate(Context context) |