donaldp 2002/06/20 00:13:23
Added: antlib/src/java/org/apache/antlib/template FeatureDef.java
TemplateDef.java
Log:
Add in meta data for templating
Revision Changes Path
1.1
jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/template/FeatureDef.java
Index: FeatureDef.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.antlib.template;
/**
* This defines a feature (either an attribute or an element)
* that can be accepted by the template task.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @version $Revision: 1.1 $ $Date: 2002/06/20 07:13:23 $
*/
public class FeatureDef
{
private final String m_name;
private final String m_type;
private final String m_defaultValue;
private final boolean m_optional;
public FeatureDef( final String name,
final String type,
final String defaultValue,
final boolean optional )
{
m_name = name;
m_type = type;
m_defaultValue = defaultValue;
m_optional = optional;
}
public String getName()
{
return m_name;
}
public String getType()
{
return m_type;
}
public String getDefaultValue()
{
return m_defaultValue;
}
public boolean isOptional()
{
return m_optional;
}
}
1.1
jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/template/TemplateDef.java
Index: TemplateDef.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.antlib.template;
import org.apache.myrmidon.api.metadata.ModelElement;
/**
* This defines a feature (either an attribute or an element)
* that can be accepted by the template task.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @version $Revision: 1.1 $ $Date: 2002/06/20 07:13:23 $
*/
public class TemplateDef
{
/**
* The attributes that the template instance can define.
*/
private final FeatureDef[] m_attributes;
/**
* The elements that the template instance can define.
*/
private final FeatureDef[] m_elements;
/**
* The un-expanded template model.
*/
private final ModelElement m_template;
public TemplateDef( final FeatureDef[] attributes,
final FeatureDef[] elements,
final ModelElement template )
{
m_attributes = attributes;
m_elements = elements;
m_template = template;
}
public FeatureDef[] getAttributes()
{
return m_attributes;
}
public FeatureDef[] getElements()
{
return m_elements;
}
public ModelElement getTemplate()
{
return m_template;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>