Claims
- 1. A method for controlling access to deprecated methods of an implementation, comprising:
receiving a request to access a method that has been marked as deprecated; building a call stack for the request; inspecting the call stack to determine if the request is from an application outside of the implementation; and denying access to the method if the request is determined to be from the application outside of the implementation upon the inspection.
- 2. A method for controlling access to deprecated methods of an implementation as recited in claim 1, wherein inspecting the call stack to determine if the request is from the application outside of the implementation includes,
moving through the call stack starting from the method; bypassing an intervening reflection method if a reflection method separates the method and the request; locating the request in the call stack; and determining whether the request is from the application outside of the implementation.
- 3. A method for controlling access to deprecated methods of an implementation as recited in claim 2, wherein determining whether the request is from the application outside of the implementation includes,
determining whether the request has a domain identical to the domain of the method.
- 4. A method for controlling access to deprecated methods of an implementation as recited in claim 1, wherein the application outside of the implementation is a test and compatibility kit (“TCK”).
- 5. A method for controlling access to deprecated methods of an implementation, comprising:
receiving a request to access a method that has been marked as deprecated; building a call stack for the request; inspecting the call stack to determine if the request is from an application outside of the implementation; and acting on the request in accordance with a control policy defined by a pluggable policy.
- 6. A method for controlling access to deprecated methods of an implementation as recited in claim 5, wherein a change in the pluggable policy defines a new control policy for acting on the request.
- 7. A method for controlling access to deprecated methods of an implementation as recited in claim 5, wherein the pluggable policy denies access to the request if the request is determined to be from outside of the implementation upon the inspection
- 8. A method for controlling access to deprecated methods of an implementation as recited in claim 7, wherein the request is determined to be outside of the implementation if a domain of the request differs from the domain of the method.
- 9. A method for controlling access to deprecated methods of an implementation as recited in claim 7, wherein the request is determined to be outside of the implementation if the request is a non-system request.
- 10. A method for allowing access to a deprecated element of a software implementation, the method comprising:
invoking a deprecated element of the software implementation by a caller element; invoking an access controller, the access controller including a pluggable access control policy; and determining the accessibility of the deprecated element by the caller element using the pluggable access control policy, the determining including,
granting access to the caller element if the caller element satisfies a criteria of the access control policy; and denying access to the caller element if the caller element fails to satisfy the criteria of the access control policy.
- 11. A method as recited in claim 10, wherein the criteria of the access control policy is allowing access to the caller element if the caller element has a domain identical to the domain of the software implementation.
- 12. A method as recited in claim 11, the method further comprising:
building a plurality of stack frames of a call stack in successive order, as the deprecated element, an intervening element, and the caller element are invoked.
- 13. A method for determining the accessibility of a caller element to a deprecated method of a software implementation, the method comprising:
invoking an access controller, the access controller including a pluggable access control policy configured to deny access to a caller element having a domain different than the domain of the software implementation; and limiting access to the deprecated method using the access control policy.
- 14. A method of claim 13, wherein limiting access to the deprecated method using the access control policy includes,
allowing the caller element access to the deprecated method if the caller element has a domain identical to the domain of the software implementation; and denying the caller element access to the deprecated method if the domain of the caller element differs from the domain of the software implementation.
- 15. A method of claim 14, wherein the domain of the caller element is identical to the domain of the software implementation if the caller element is an element of the software implementation.
- 16. A method of claim 14, wherein the domain of the caller element differs from the domain of the software application if the caller element is an element of a software application.
- 17. A method of claim 15, wherein the software application is a test and compatibility kit (“TCK”).
- 18. A system for limiting access to a deprecated method of a software implementation, the system comprising:
an access controller code configured to include an access control policy, the access control policy configured to be used to determine an accessibility of a caller element to the deprecated method; and a call stack defining at least the caller element and the deprecated method, the call stack capable of being inspected to determine accessibility to the caller element.
- 19. A system for limiting access to a deprecated method of a software implementation as recited in claim 18, wherein the access control policy is pluggable.
- 20. A system for limiting access to a deprecated method of a software application as recited in claim 19, wherein the access control policy is configured to deny access to the deprecated method if the caller element is determined to have a domain that differs from the domain of the software implementation.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority from U.S. Provisional Patent Application No. 60/369,379 filed on Apr. 1, 2002 and entitled “Method and System for Detecting Deprecated Elements During Runtime,” which is incorporated herein by reference in its entirety.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60369379 |
Apr 2002 |
US |