Update of /cvsroot/xdoclet/xdoclet2/src/java/xdoclet
In directory sc8-pr-cvs1:/tmp/cvs-serv22388/src/java/xdoclet
Modified Files:
MetadataProvider.java Plugin.java Property.java
Log Message:
More Jalopy reformattings
Index: MetadataProvider.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/MetadataProvider.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** MetadataProvider.java 18 Mar 2003 22:30:47 -0000 1.4
--- MetadataProvider.java 20 Mar 2003 18:52:33 -0000 1.5
***************
*** 17,47 ****
public interface MetadataProvider {
/**
! * Returns a Collection of objects that should be used as basis for code
generation.
! * It's up to the Plugins to handle the elements in the Collection. Special
Plugins
! * will expect the elements in the Collection to be of a certain type.
! *
! * @return Collection of arbitrary objects
! */
Collection createMetadataCollection()
throws XDocletException;
/**
! * Returns the string that will be replaced in the {0} part of the file
! * name.
! *
! * @param o the object the substitution string should be derived from.
! * @return the substitution string.
! */
String getFilenameSubstitutionValue(Object o);
/**
! * Returns the package name that will be used to determine the file
! * name. The default implementation expects the object to be of class
! * [EMAIL PROTECTED] xjavadoc.XClass}. Override this method if you want to deal
with
! * a different type.
! *
! * @param o the object from which the package name is derived.
! * @return the package name to use for o.
! */
String getPackageName(Object o);
}
--- 17,47 ----
public interface MetadataProvider {
/**
! * Returns a Collection of objects that should be used as basis for code
generation.
! * It's up to the Plugins to handle the elements in the Collection. Special
Plugins
! * will expect the elements in the Collection to be of a certain type.
! *
! * @return Collection of arbitrary objects
! */
Collection createMetadataCollection()
throws XDocletException;
/**
! * Returns the string that will be replaced in the {0} part of the file
! * name.
! *
! * @param o the object the substitution string should be derived from.
! * @return the substitution string.
! */
String getFilenameSubstitutionValue(Object o);
/**
! * Returns the package name that will be used to determine the file
! * name. The default implementation expects the object to be of class
! * [EMAIL PROTECTED] xjavadoc.XClass}. Override this method if you want to deal
with
! * a different type.
! *
! * @param o the object from which the package name is derived.
! * @return the package name to use for o.
! */
String getPackageName(Object o);
}
Index: Plugin.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/Plugin.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** Plugin.java 19 Mar 2003 00:50:13 -0000 1.15
--- Plugin.java 20 Mar 2003 18:52:33 -0000 1.16
***************
*** 55,59 ****
/** Encoding of output. */
private String _encoding = "ISO-8859-1";
! private String _packageName;
private String _fileName = "";
--- 55,59 ----
/** Encoding of output. */
private String _encoding = "ISO-8859-1";
! private String _packageName = "";
private String _fileName = "";
***************
*** 208,212 ****
if (isGenerateOneFile()) {
! getContextObjects().put("collection", getFilteredCollection());
getContextObjects().put("classes",
getContextObjects().get("collection"));
getContextObjects().put("packageName", getPackageName());
--- 208,212 ----
if (isGenerateOneFile()) {
! getContextObjects().put("collection", getFilteredMetadataCollection());
getContextObjects().put("classes",
getContextObjects().get("collection"));
getContextObjects().put("packageName", getPackageName());
***************
*** 217,221 ****
LogFactory.getLog(Plugin.class).info("Generating " + getFileName() +
"...");
! for (Iterator i = getFilteredCollection().iterator(); i.hasNext();) {
Object object = i.next();
--- 217,221 ----
LogFactory.getLog(Plugin.class).info("Generating " + getFileName() +
"...");
! for (Iterator i = getFilteredMetadataCollection().iterator();
i.hasNext();) {
Object object = i.next();
***************
*** 255,259 ****
protected void validate()
throws XDocletException {
! if (_packageName != null) {
if (!getPackageSubstitutions().isEmpty()) {
throw new XDocletException("Can't specify both packageSubstitution
and packageName.");
--- 255,259 ----
protected void validate()
throws XDocletException {
! if ( !"".equals( _packageName )) {
if (!getPackageSubstitutions().isEmpty()) {
throw new XDocletException("Can't specify both packageSubstitution
and packageName.");
***************
*** 309,313 ****
public final String getPackageName() {
! return (_packageName != null) ? _packageName : "";
}
--- 309,313 ----
public final String getPackageName() {
! return _packageName;
}
***************
*** 356,370 ****
* @return all accepted classes.
*/
! protected final Collection getFilteredCollection()
throws XDocletException {
// Get all the classes including inner classes.
! Collection collection = getXDoclet().getMetadataCollection();
Collection result;
if (getAccept() != null) {
// Filter out the objects we want.
! result = CollectionUtils.select(collection, getAccept());
} else {
! result = collection;
}
--- 356,370 ----
* @return all accepted classes.
*/
! protected final Collection getFilteredMetadataCollection()
throws XDocletException {
// Get all the classes including inner classes.
! Collection metadataCollection = getXDoclet().getMetadataCollection();
Collection result;
if (getAccept() != null) {
// Filter out the objects we want.
! result = CollectionUtils.select(metadataCollection, getAccept());
} else {
! result = metadataCollection;
}
***************
*** 443,447 ****
* Default is "ISO-8859-1"
*
! * @param encoding
*/
public void setEncoding(String encoding) {
--- 443,447 ----
* Default is "ISO-8859-1"
*
! * @param encoding the encoding to use.
*/
public void setEncoding(String encoding) {
***************
*** 455,459 ****
* @return the XML encoding.
*/
! protected String getEncoding() {
return _encoding;
}
--- 455,459 ----
* @return the XML encoding.
*/
! public String getEncoding() {
return _encoding;
}
Index: Property.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/Property.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Property.java 16 Mar 2003 17:06:55 -0000 1.5
--- Property.java 20 Mar 2003 18:52:34 -0000 1.6
***************
*** 14,29 ****
/**
! * Constructs a new property. Empty constructor is needed
! * by Ant to create dynamic properties.
! */
public Property() {
}
/**
! * Constructs a new property.
! *
! * @param name the name of the property
! * @param value the value of the property
! */
public Property(String name, String value) {
setName(name);
--- 14,29 ----
/**
! * Constructs a new property. Empty constructor is needed
! * by Ant to create dynamic properties.
! */
public Property() {
}
/**
! * Constructs a new property.
! *
! * @param name the name of the property
! * @param value the value of the property
! */
public Property(String name, String value) {
setName(name);
***************
*** 63,69 ****
/**
! * Gets the name of the property.
! * @return the name of the property
! */
public String getName() {
return _name;
--- 63,69 ----
/**
! * Gets the name of the property.
! * @return the name of the property
! */
public String getName() {
return _name;
***************
*** 71,77 ****
/**
! * Sets the name of the property.
! * @param name the name of the property
! */
public void setName(String name) {
_name = name;
--- 71,77 ----
/**
! * Sets the name of the property.
! * @param name the name of the property
! */
public void setName(String name) {
_name = name;
***************
*** 79,85 ****
/**
! * Gets the value of the property.
! * @return the value of the property
! */
public String getValue() {
return _value;
--- 79,85 ----
/**
! * Gets the value of the property.
! * @return the value of the property
! */
public String getValue() {
return _value;
***************
*** 87,93 ****
/**
! * Sets the value of the property.
! * @param value the value of the property
! */
public void setValue(String value) {
_value = value;
--- 87,93 ----
/**
! * Sets the value of the property.
! * @param value the value of the property
! */
public void setValue(String value) {
_value = value;
-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel