|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--attrib4j.examples.AbstractDeposit | +--attrib4j.examples.InheritanceTxExample
A simple example class that demonstrates the use of custom attributes. The idea is to associate EJB like transaction attributes to a method, much like would be described in the deployment descriptor. This example shows inheritance of attributes through interfaces an abstract base classes.
Constructor Summary | |
InheritanceTxExample()
Create an instance. |
Method Summary | |
void |
deposit(int accountNbr,
long amount)
Just a placehold to test out attributes in the inheritance chain. |
void |
extractAttributes()
Show how attributes can be extracted at runtime. |
static void |
main(java.lang.String[] args)
Run the example program. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InheritanceTxExample()
Method Detail |
public void deposit(int accountNbr, long amount)
AbstractDeposit
deposit
in interface DepositTransaction
deposit
in class AbstractDeposit
accountNbr
- amount
- public void extractAttributes() throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
- if cannot find declared method on class.public static void main(java.lang.String[] args)
args
- The command line arguments, not used.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |