Exemplo n.º 1
0
        // NOTE that there is no synchronization used here. It is correct
        // (though not efficient) to generate more than one MethodAccessor
        // for a given Method. However, avoiding synchronization will
        // probably make the implementation more scalable.
        private MethodAccessor AcquireMethodAccessor()
        {
            // First check to see if one has been created yet, and take it
            // if so
            MethodAccessor tmp = AnnotatedElement_Fields.Null;

            if (Root_Renamed != AnnotatedElement_Fields.Null)
            {
                tmp = Root_Renamed.MethodAccessor;
            }
            if (tmp != AnnotatedElement_Fields.Null)
            {
                MethodAccessor_Renamed = tmp;
            }
            else
            {
                // Otherwise fabricate one and propagate it up to the root
                tmp            = ReflectionFactory.newMethodAccessor(this);
                MethodAccessor = tmp;
            }

            return(tmp);
        }