# Static Method

**URL:** <https://verificationacademy.com/forums/t/static-method/30147>\
**Category:** UVM\
**Tags:** UVM, static-method\
**Created:** [November 19, 2014, 6:43pm UTC](https://verificationacademy.com/forums/t/static-method/30147 "2014-11-19T18:43:03Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [November 20, 2014, 8:17pm UTC](https://verificationacademy.com/forums/t/static-method/30147/6 "2014-11-20T20:17:38Z")

</div>

_In reply to [TV](https://verificationacademy.com/forums/t/static-method/30147/5):_

1. A typedef is not required in this case because pss\_env\_config is known to be a type when it appears in the variable declaration **t**. The **class pss\_env\_config** in the line above takes care of that. The only time a typedef is absolutely required is when the compiler encounters a never before seen identifier. That happens when you have a pair of cyclic definitions: class A needs a handle to class B, and class B needs a handle to class A. You can only define one class first, the other will need a typedef. The other place you will see typedefs used is then the scripts used to compile code are lax in their compilation order. You will see a lot of that in the UVM.  
If you are getting a syntax error from the compilation of the pss\_env\_config.svh file, then show the error and let your vendor know they have a bug.
2. The key word in section 8.10 is _ **members** _. “A static method has no access to non-static **members** (class properties or methods)” It does have access to everything else visible within its scope. The functions uvm\_report\_enable() and uvm\_report\_fatal() are both defined in the package uvm\_pkg, they are not member class methods. So they are visible and accessible to the static method pss\_env\_config::get\_config. Had the class pss\_env\_config been extended from uvm\_component (which is extended from uvm\_report\_object), then there would be a legitimate syntax error. That is because uvm\_report\_object _does_ have class member methods named uvm\_report\_enable and uvm\_report\_fatal. Those non-static class methods names would be found first, hiding the functions defined at the top-level of the package.

---

_[View the full topic](https://verificationacademy.com/forums/t/static-method/30147)._
