How to know a variable is accessed ??

Hi all,
I have two Java Classes as follows :
public class A {
public int a =5;
and --
public class B {
public static void main(String[] args) {
System.out.println(new A().a);
Now i want to generate a log file (when the execution of main() method of class B ends) which tells me that "THE VARIABLE NAMED 'a' OF CLASS 'A' IS ACCESSED ONCE" .
PLEASE NOTE THAT I DON'T HAVE PERMISSION TO MODIFY THE SOURCE CODE OF EXISTING CLASS ..
So please tell me how to proceed to get the solution ..
Thanks.
Ganesh

actually i am developing an application which will determine the performance of any existing apps on basis of no of variable accessed ... it is only the high level overview of my application . If the variable is private and i have getters and setters for them then i am able to do that using byte code injection in those getter and setter methods .. but in the case of Public variable , i don't know exactly how JVM access the value of the variable..

Similar Messages

  • How do I store VI References in global variables and access them later

    From what I know, Labview automatically deletes VI references when they go out of use. Is there a way for me to override this so that I can access a set of preloaded references in a separate VI? Essentially I would like to open the VI's dynamically into the memory, store the references in global variables and access them at a later time. The VI's I'm referencing won't be known until runtime. I know its not the safest way to do it, but it would be the most productive on my end.
    Thank you
    Clay Upton

    I'm not sure what you mean by "a later time", but a VI reference will remain valid as long as the VI is in memory. If you don't unload the VIs, the references will remain valid.
    If you do need to unload the VIs, for whatever reason, I would suggest the following:
    Create a functional global as your interface for obtaining the references.
    Feed the paths to the VIs into the VI when initializing it (since you don't know which VIs in advance).
    When calling the VI to obtain the references, have the VI check them first (using the Not a Number... primitive). If it sees that they're invalid, it can open a new reference and return that.
    You should note that when a VI is removed from memory, the data space is used is released, so if those VIs are expected to hold data (using shift registers, etc.) this will be a problem.
    The description I've given will only be usable in certain instances (and it has its intricacies), but you didn't really give any details about what you're actually trying to accomplish.
    Try to take over the world!

  • How to know the type of a variable??

    how to know the type of a variable??
    For example, give you a variable s, how to determine if it is
    a primitive type, of an object?? If this is primitive type,
    any ways to determine if it is integer, boolean, double, ...??

    I am currently working on a project where this happens. I have a main type of object that all of my other types extend. While working on the objects in a method, any type of other object could be coming through. To test I try to cast the object and catch class cast exceptions. This only works because I know the different type that will be coming through....
    public void testObject(classX object){
      try{
        classY object = (classY)object;
      }catch(ClassCastException CC){
        try{
          classZ object = (classZ)object;
        }catch(ClassCastException CCC){
          /// the object fails to be cast as the types I tested for.
    }

  • How to know last access date for the schema's

    Dear all,
    could u plz tell me How to know last access date for the schema’s
    Regards,
    Srinivasa rao.P

    Srinivas,
    could u plz tell me How to know last access date for the schema’s
    In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
    Aman....

  • How to know the number of digits in one variable?

    I have
    lv_varibale(16) TYPE C.
    Some times lv_variable is filled with 15 digits and some times it is with 14 digits .
    How can I know in my program  how many digits that variable contains .I mean is there key word/syntax I need to use OR I have to go for function module (if so which one and how to pass variables in that) ?
    You help will be appreciated .Thanks in advance.

    Hai Sam Kumar
    Use 'strlen' Function for getting the String Length
    Example
    <b>Data : lv_varibale(16) TYPE C.
    Data : v_length type i.
    lv_varibale = 'Sreenivasulu'.
    v_length = strlen( lv_varibale ).
    write:/ v_length.</b>
    Regards
    Sreeni
    Message was edited by: Sreenivasulu Ponnadi

  • How to know which table in the database a form is accessing

    Actually Im new to oracle applications,
    Im getting an error when i open a form from system administrator responsibility saying that table doesnot exist.
    My basic doubt is, how to know which table in the database a form is accessing.
    Any response is higly appreciated.
    Thanks,
    Praveen
    Edited by: user10239520 on Sep 10, 2008 7:07 AM

    Take a look at the following thread:
    Is there a query log in EBS?
    Re: Is there a query log in EBS?

  • Does anyone know how I might be able to access picture frame in IOS 6 while in Guided Access mode..?

    Does anyone know how I might be able to access Picture Frame while being in Guided Access mode..?

    I don't exactly understand your issue but if your stuck in guided access press and hold the power and home until you see your device turns off keep holding then when you see the apple startup logo let go (this is called a hard reset or a respring) this will force you out of guided access and into the home screen where you can unlock the device with out being stuck in guided access
    If this does not help you please ignore this comment

  • How to know  pro-grammatically variable type(string ,numeric ....) of TestStand variable using CVI

    Hi,
    how to know  pro-grammatically  variable type(string ,numeric ....)  of TestStand  variable using Labwindows CVI.
    Thanks
    Mukesh Kumar

    Mukesh,
    You could use the TS_PropertyGetType() function in CVI to do this. Here is a reference page for the GetType function--you can see that it returns a PropertyValueType which will indicate which type the PropertyObject (variable) is. In CVI, you'll find this function in the NI TestStand API 2013 instrument methods, under PropertyObject > Static Properties. 
    Hope it helps, and let us know if you have any more questions about it!
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • I'm about to transfer the contents of my existing HDD in my (dead PSU) iMac to another computer. I'm just wanting to know if and how I will be able to access my files and documents from the old hard drive once I've made the backup?

    I'm about to transfer the contents of my existing HDD in my (dead PSU) iMac to another computer. I'm just wanting to know if and how I will be able to access my files and documents from the old hard drive once I've made the backup?

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

  • HT204074 I just joined apple itunes match and I want to know if I can access my music on my wife's iPhone if she uses a different ID and password .  If so how can I do this?

    I just joined apple itunes match and I want to know if I can access my music on my wife's iPhone if she uses a different ID and password .  If so how can I do this?

    You would have to sign in with your account. Be aware that an iDevice or Mac or PC can only be associated with a particular iCloud/ iTunes in the Cloud account once every 90 days. So if you associate your iTunes in the cloud/Match account with her iPhone ,she will have to wait 90 days before going back to HER itunes in the cloud account.

  • How to know when I'm doing a createInsert?

    how to know when I'm doing a createInsert, this to hide a button when you run this action, I am using a task flow.
    my version of jdeveloper is 12c

    hi,
      So you are using the createInsert as a method call in task flow. That is your form/table will be come new rows and you want to disable some button.
    Your task flow might be as below
          CreateInsert---->Page.
    To do so
    1.) Take properties of your method call and bind the Method property to a method in a bean (bean registered in the task flow with scope view or any higher scope)
    2) Call the create insert operation programmatically in that method.
    3) And in that method after the createinsert ,set a boolean variable in pageFlowScope.
    4)Put this variable in the disable property or visible propery of the button you wabt to hide/diable.
    eg:
        public void doCreateInserOperation(){
            try {
               // Programatically invoke CreateInsert
                DCBindingContainer bindings = (DCBindingContainer)getBindingContainer();
                bindings.getOperationBinding("CreateInsert").execute();
            //Set a variable in page Flow Scope 
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("disableButton", true)
            } catch (Exception e) {
                e.printStackTrace();
        public BindingContainer getBindingContainer() {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings}", Object.class);
            return (BindingContainer)valueExp.getValue(elContext);
    you can access this variable in EL expression as #{pageFlowScope.disableButton}. So when your page render it will be in CreateInsert mode and the button will be disabled/hidden.
    I hope this will help you.
    With regards,
    Gijith.

  • How to select two variables from recordset

    Parse error: parse error in
    C:\wamp\www\dotweb\access\agreement_handbook.php on line 72
    I get the above error when I try to run the above page. I
    don't know how to select one variable which is the compid that I
    get from the url and a specific name from another column called
    documentname. I know that this is a very simple thing and I could
    do it just fine with ASP pages, but this is my first time with PHP.
    Please help!!!

    On Tue, 17 Feb 2009 20:56:30 +0000 (UTC), "kmlohr"
    <[email protected]> wrote:
    > $query_rsAgreements = sprintf("SELECT * FROM agreements
    WHERE CompId = %s and
    >DocumentName = "handbook"",
    GetSQLValueString($colname_rsAgreements, "int"));
    Change the above line to:
    $query_rsAgreements = sprintf("SELECT * FROM agreements WHERE
    CompId = %s
    and DocumentName = 'handbook'",
    GetSQLValueString($colname_rsAgreements,
    "int"));
    Gary

  • How do you use Default Resource Access Information?

    I have some 10g Forms & Reports that I want to use with SSO and they will all be connecting to the database with the same connection info. I know how to configure a Default Resource Access Information, but how do you use this with Forms & Reports?

    Douglas,
    the default Resource Access Infomation should be the connection information right? This is used in conjunction with SSO. You need to configure your F&R applications to delegate authentication to SSO by placing ssoMode=true in the config section of formsweb.cfg.
    The Forms Servlet will connect to OID retrieve the Resource Access Information (descriptor) for a given user and automatically log them into the application.
    Users will need a global identity in OID and SSO must be enabled to use resource access info with F&R
    regards,
    tt

  • How to know BW report there in how many roles

    dear master's,
    In the BW system version 3.5 ,how to know roles by BW report, i have checked in SUIM for cheking the same,i could able to search by T code and object not by report in the role menu
    Edited by: rameshbabu muddana on Feb 12, 2009 1:56 PM
    Edited by: rameshbabu muddana on Feb 12, 2009 1:57 PM

    Hi,
    You can find the roles which all having particular BW report by the table AGR_1251.
    For this you need to know the technical name of the report, you can find the technical name of the report either in Bex analyzer or in RSRT.
    For granting access to any BW report in a role the technical name of the role should be included in the object S_RS_COMP,
    1) go to transaction SE16.
    2) open the table AGR_1251
    3) enter in the field "object with "S_RS_COMP"
    4) and the field "FIELD" with "RSZCOMPID"
    5) Give the BW report (technical name) which you want to search in the field "LOW"
    6) click on execute.
    Caution: in case you are giving complete techincal name of the report, it will show only if the roles are updated under the object S_RS_COMP with complete technical names, however if in the roles you are giving ranges something (as example : BW_FIN_*) you need to give the range in SE16 as well.
    Hope this helps you!
    Regards,
    Ananth

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

Maybe you are looking for

  • How to connect Apple TV to an Samsung HDtv with no hdmi port

    I just purchased an Apple TV and discovered my 9 year old Samsung 55 in HDTV has no hdmi port. Is there a way to use the Aplle TV with this TV? Thanks and Regards

  • Can't connect to network (wireless)

    Hello, I have a Dell Vostro 1500 with an Intel pro 3985 wireless card. The driver that comes with the latest kernel is installed. Running lsmod shows iwl3945. ifconfig wlan0: wlan0 Link encap:Ethernet HWaddr 00:1C:BF:99:B1:DE UP BROADCAST MULTICAST M

  • ITunes with Time Machine

    I cannot get iTunes to work in Time Machine. Every time I have iTunes open and click on the Time machine icon on the deck a screen of my desktop pops up instead. I spoke with the "experts" at tech support and they are telling me that Time Machine wil

  • What's worth keeping from old Laptops?

    I have an original Titanium PowerBook (1x) and a first release Aluminum PowerBook (2x). 1x doesn't boot, 2x's screen hinge and cable are broken. I have just removed the HDs from both in order to fully erase them to destroy any data on them. Are there

  • Watch qt movies on tv

    hello, Is there a way to watch produced quicktime movies edited in fce4 directly from macbook on tv (full screen)so using macbook as dvdplayer. If yes what kind of cables or programmes do i need? quicktime pro? thanks eric