|HOME |ABOUT |ARTICLES |ACK |FEEDBACK |TOC |LINKS |BLOG |JOBS |


Tutorials



AOP

Aspect Oriented Extensions :



AOP is used in conjunction with object-oriented programming. By compartmentalizing aspect code, cross-cutting concerns become easy to deal with. Aspects of a system can be changed, inserted or removed at compile time, and become reusable.

placement :
The placement element specifies where code is woven into a method.
before inserts the code inside a method just
before :: it begins any execution (that included execution of initializers)
after :: inserts code at each return statement and at the end of the methodâ~@~Ys block, if it falls through without a return
statement.
around :: executes the code in place of the methodâ~@~Ys original code.



EXAMPLE : aop around
class aop {
task disp(){
printf(" aop class ");
ihop($ori_lin);
}
}

extends eaop (aop){
around task disp(){
printf("eaop class ");
}

program main{
aop obj;
obj = new();
obj.disp();
}

RESULTS

eaop class


EXAMPLE : aop before
class aop {
task disp(){
printf(" aop class ");
}
}

extends eaop (aop){
before task disp(){
printf("eaop class ");
}

program main{
aop obj;
obj = new();
obj.disp();
}

RESULTS

eaop class
aop class


EXAMPLE : aop after
class aop {
task disp(){
printf(" aop class ");
}
}

extends eaop (aop){
after task disp(){
printf("eaop class ");
}

program main{
aop obj;
obj = new();
obj.disp();
}

RESULTS

aop class
eaop class


Index
Introduction
Data Types
Linked List
Operators Part 1
Operators Part 2
Operators Part 3
Operator Precedence
Control Statements
Procedures And Methods
Interprocess
Fork Join
Shadow Variables
Fork Join Control
Wait Var
Event Sync
Event Trigger
Semaphore
Regions
Mailbox
Timeouts
Oop
Casting
Randomization
Randomization Methods
Constraint Block
Constraint Expression
Variable Ordaring
Aop
Predefined Methods
String Methods
Queue Methods
Dut Communication
Functional Coverage

Report a Bug or Comment on This section - Your input is what keeps Testbench.in improving with time!





<< PREVIOUS PAGE

TOP

NEXT PAGE >>

copyright © 2007-2017 :: all rights reserved www.testbench.in::Disclaimer