User: ko5tik
Date: 02/04/18 09:23:05
Added: src/java/xtags/condition Owner.java
Log:
added ejb:persistence & new condition which evaluates
nested ocndition for class owning program element
Revision Changes Path
1.1 xdocletgui/src/java/xtags/condition/Owner.java
Index: Owner.java
===================================================================
/*
* Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of BEKK Consulting nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
/*
* Change log
*
*/
package xtags.condition;
import xjavadoc.XProgramElement;
import java.util.Iterator;
/**
* evaluate nested condition[s] for owner of xprogramelement
*
* @author kostik
* @created April 17, 2002
*/
public class Owner extends Condition {
/**
* construct Owner condition object
*/
public Owner() {
}
/**
* convert to string value
*
* @return string representation
*/
public String toString() {
return getClass().getName();
}
/**
* evaluate whether nested condition (first one) holds for owner of program
* element
*
* @param xprogramelement xprogramelement to check
* @return whether name of program element start with prefix
*/
public boolean eval(XProgramElement xprogramelement) {
if (xprogramelement.containingClass() != null) {
Iterator conditions = getConditions();
if (conditions.hasNext()) {
Condition cond = (Condition)conditions.next();
return cond.eval(xprogramelement.containingClass());
}
else {
// nothing to evaluate. return true
return true;
}
}
else {
return false;
}
}
}
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel