Update of /cvsroot/xdoclet/xdoclet2/src/java/xdoclet
In directory sc8-pr-cvs1:/tmp/cvs-serv1596/src/java/xdoclet
Modified Files:
Accept.java Plugin.java
Log Message:
Copyright.
Index: Accept.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/Accept.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Accept.java 5 Mar 2003 22:27:09 -0000 1.2
--- Accept.java 7 Mar 2003 09:15:08 -0000 1.3
***************
*** 21,25 ****
/**
* This method is here so that the predicate can be set from Ant.
!
* @param predicateType the name of the predicate to add.
* @return a Predicate
--- 21,25 ----
/**
* This method is here so that the predicate can be set from Ant.
! *
* @param predicateType the name of the predicate to add.
* @return a Predicate
***************
*** 41,44 ****
--- 41,45 ----
/**
* Sets the predicate to use.
+ *
* @param predicate the predicate to use.
*/
***************
*** 49,52 ****
--- 50,54 ----
/**
* Evaluates the predicate.
+ *
* @return true if the predicate evaluates to true.
* @see #setPredicate
Index: Plugin.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/Plugin.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Plugin.java 7 Mar 2003 08:50:30 -0000 1.5
--- Plugin.java 7 Mar 2003 09:15:09 -0000 1.6
***************
*** 23,27 ****
* <p>A plugin can operate in two different modes, depending on the
* value of the fileName.</p>
! *
* <ul>
* <li>If there is a "{0}" in the fileName, one file will be generated for
--- 23,27 ----
* <p>A plugin can operate in two different modes, depending on the
* value of the fileName.</p>
! *
* <ul>
* <li>If there is a "{0}" in the fileName, one file will be generated for
***************
*** 188,192 ****
LogFactory.getLog(Plugin.class).info("Generating " +
destinationFile.getAbsolutePath());
generateOneFileForAll(destinationFile);
! } else {
LogFactory.getLog(Plugin.class).info("Generating " + getFileName() +
"...");
--- 188,193 ----
LogFactory.getLog(Plugin.class).info("Generating " +
destinationFile.getAbsolutePath());
generateOneFileForAll(destinationFile);
! }
! else {
LogFactory.getLog(Plugin.class).info("Generating " + getFileName() +
"...");
***************
*** 207,215 ****
String destinationUnqualifiedClassName =
destinationFile.getName().substring(0,
! destinationFile.getName().length() - 5);
getContextObjects().put("destinationUnqualifiedClassName",
destinationUnqualifiedClassName);
getContextObjects().put("destinationQualifiedClassName",
! TypeConversionUtil.getQualifiedClassName(destinationPackageName,
destinationUnqualifiedClassName));
generateOneFileForEach(destinationFile, object);
--- 208,216 ----
String destinationUnqualifiedClassName =
destinationFile.getName().substring(0,
!
destinationFile.getName().length() - 5);
getContextObjects().put("destinationUnqualifiedClassName",
destinationUnqualifiedClassName);
getContextObjects().put("destinationQualifiedClassName",
!
TypeConversionUtil.getQualifiedClassName(destinationPackageName,
destinationUnqualifiedClassName));
generateOneFileForEach(destinationFile, object);
***************
*** 219,223 ****
protected void validate()
! throws XDocletException {
if (_packageName != null) {
if (!_packageSubstitutions.isEmpty()) {
--- 220,224 ----
protected void validate()
! throws XDocletException {
if (_packageName != null) {
if (!_packageSubstitutions.isEmpty()) {
***************
*** 276,280 ****
private final String getSubstitutedPackageName(Object object)
! throws XDocletException {
String packageName = null;
String originalPackageName =
getXDoclet().getMetadataProvider().getPackageName(object);
--- 277,281 ----
private final String getSubstitutedPackageName(Object object)
! throws XDocletException {
String packageName = null;
String originalPackageName =
getXDoclet().getMetadataProvider().getPackageName(object);
***************
*** 288,293 ****
if ((packageName != null) && (candidate != null)) {
throw new XDocletException("Ambiguous package substitution for "
! + getXDoclet().getMetadataProvider().getPackageName(object) + ".
Both " + packageName + " or "
! + candidate + " are possible substitution results.");
}
--- 289,294 ----
if ((packageName != null) && (candidate != null)) {
throw new XDocletException("Ambiguous package substitution for "
! +
getXDoclet().getMetadataProvider().getPackageName(object) + ". Both " + packageName +
" or "
! + candidate + " are possible substitution
results.");
}
***************
*** 312,316 ****
*/
protected final Collection getFilteredCollection()
! throws XDocletException {
// Get all the classes including inner classes.
Collection collection = getXDoclet().getCollection();
--- 313,317 ----
*/
protected final Collection getFilteredCollection()
! throws XDocletException {
// Get all the classes including inner classes.
Collection collection = getXDoclet().getCollection();
***************
*** 320,324 ****
// Filter out the objects we want.
result = CollectionUtils.select(collection, _accept);
! } else {
result = collection;
}
--- 321,326 ----
// Filter out the objects we want.
result = CollectionUtils.select(collection, _accept);
! }
! else {
result = collection;
}
***************
*** 343,347 ****
*/
protected void generateOneFileForAll(File file)
! throws XDocletException {
throw new UnsupportedOperationException();
}
--- 345,349 ----
*/
protected void generateOneFileForAll(File file)
! throws XDocletException {
throw new UnsupportedOperationException();
}
***************
*** 356,360 ****
*/
protected void generateOneFileForEach(File file, Object object)
! throws XDocletException {
throw new UnsupportedOperationException();
}
--- 358,362 ----
*/
protected void generateOneFileForEach(File file, Object object)
! throws XDocletException {
throw new UnsupportedOperationException();
}
***************
*** 366,370 ****
*/
private final File getAndCreateRealDestDir(String packageName)
! throws XDocletException {
if (getDestination() == null) {
throw new XDocletException("destination was not specified for plugin \""
+ getName() + "\"");
--- 368,372 ----
*/
private final File getAndCreateRealDestDir(String packageName)
! throws XDocletException {
if (getDestination() == null) {
throw new XDocletException("destination was not specified for plugin \""
+ getName() + "\"");
***************
*** 387,391 ****
*/
public final File getDestinationFileForAll()
! throws XDocletException {
return new File(getAndCreateRealDestDir(getPackageName()), getFileName());
}
--- 389,393 ----
*/
public final File getDestinationFileForAll()
! throws XDocletException {
return new File(getAndCreateRealDestDir(getPackageName()), getFileName());
}
***************
*** 400,406 ****
*/
public final File getDestinationFileForOne(Object object)
! throws XDocletException {
String fileNameSubstitutionValue =
getXDoclet().getMetadataProvider().getFilenameSubstitutionValue(object);
! String fileName = MessageFormat.format(getFileName(), new String[] {
fileNameSubstitutionValue });
String packageName = getSubstitutedPackageName(object);
--- 402,408 ----
*/
public final File getDestinationFileForOne(Object object)
! throws XDocletException {
String fileNameSubstitutionValue =
getXDoclet().getMetadataProvider().getFilenameSubstitutionValue(object);
! String fileName = MessageFormat.format(getFileName(), new
String[]{fileNameSubstitutionValue});
String packageName = getSubstitutedPackageName(object);
***************
*** 435,444 ****
*/
protected void checkClass(String className)
! throws XDocletException {
try {
Class.forName(className);
! } catch (Exception e) {
throw new XDocletException("Couldn't load " + className
! + ". Make sure you have this class on the classpath used to define
XDoclet.");
}
}
--- 437,447 ----
*/
protected void checkClass(String className)
! throws XDocletException {
try {
Class.forName(className);
! }
! catch (Exception e) {
throw new XDocletException("Couldn't load " + className
! + ". Make sure you have this class on the
classpath used to define XDoclet.");
}
}
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel