-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
258af03
commit 733906f
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.ical4j.template; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
import java.util.function.UnaryOperator; | ||
|
||
/** | ||
* A template encapsulates rules for creating and modifying complex iCalendar and | ||
* vCard objects. | ||
* | ||
* @param <T> the applicable object type | ||
*/ | ||
public interface Template<T> extends UnaryOperator<T> { | ||
|
||
/** | ||
* Apply the template to a new object instance. The use of this method requires | ||
* that the applicable object type contains a default noargs constructor that | ||
* can be used to create a new object instance. | ||
* @return a new object instance resulting from applying the template | ||
* @throws NoSuchMethodException if a noargs constructor doesn't exist on the applicable object type | ||
* @throws InvocationTargetException an error resulting from invoking the noargs constructor | ||
* @throws InstantiationException an error resulting from invoking the noargs constructor | ||
* @throws IllegalAccessException an error resulting from invoking the noargs constructor | ||
*/ | ||
T apply() throws NoSuchMethodException, InvocationTargetException, InstantiationException, | ||
IllegalAccessException; | ||
} |