incubator-imperius-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reza Asadollahi (JIRA)" <>
Subject [jira] Commented: (IMPERIUS-8) Access to private variables of anchor classes in SPL file
Date Thu, 21 Aug 2008 15:22:44 GMT


Reza Asadollahi commented on IMPERIUS-8:

Regarding the private members access I faced the following problem at evalution time while
is must be detected at policy compile time. 
An anchor object has a getter method which needs an input parameter like :
         public int getVariable(boolean x) ;

this object has been used in a SPL as:
       Condition {
                  obj.varable > 100

In this case there was no exception at policy compile time, but there was an exception at
evalution time. Actually, the error in the SPL syntax must be found at compile time since
getVariable is not a parameter less method. 
The correct SPL in this case is 
       Condition {
                  obj.getVarable(true) > 100

> Access to private variables of anchor classes in SPL file
> ---------------------------------------------------------
>                 Key: IMPERIUS-8
>                 URL:
>             Project: Imperius
>          Issue Type: New Feature
>            Reporter: Reza Asadollahi
>            Assignee: Bill Stoddard
>            Priority: Minor
>         Attachments: AnchorMethodInvokeAction_Patch.txt, IdentPrimaryTuple_Patch.txt,
JavaActuator_Patch.txt, patch.txt, RunSamples_Patch.txt, SimplePolicy.spl,,
> Currently, a policy can not access the anchor class private attributes via their getter
and setter methods, and the attributes should be defined "public" instead. It is possible
to call a getter method in the "condition" section but it is more interesting to read and
write attributes in an expression-like language. For example bean.attr1 should be translated
internally to bean.getAttr1().  
> What we could do is first check if bean.attr1 is accessible (ie is public) if not we
can try doing bean.getAttr1()

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message