Method warning tracing for static objects.

@param Class of the static object making the trace call.
@param String name of the method being entered.
@param String identifying the message.
@param Object to be inserted into the message.
194854
public final void warning(Class sourceClass,
                              String methodName,
                              String messageIdentifier,
                              Object object) {
        internalWarning(null,
                        sourceClass,
                        methodName,
                        messageIdentifier,
                        object);
    }
901629
@Override
    public void visitMethod(Method obj) {
        methodName = obj.getName();
        methodSig = obj.getSignature();
    }
1140778
private void readObject(java.io.ObjectInputStream objectInputStream)
                    throws java.io.IOException
                    , java.lang.ClassNotFoundException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "readObject",
                        "ObjectInputStream="
                                        + objectInputStream);

        // Super class already handled by serilaization.
        objectInputStream.defaultReadObject();

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "readObject"
                       , "via UnsupportedOperationException");
        throw new UnsupportedOperationException();
    }
134195
public final void debug(Object source, Class sourceClass, String methodName, Object object)
    {
        debug(source, sourceClass, methodName, new Object[] { object });
    }
473611
public static function classHasMethod($method, $class) {
        $methods = self::classMethods($class);

        if (!in_array($method, $methods)) {
          return false;
        }

        return true;
    }
762107
public void trace(String s) {

        if ((s != null) &&!s.equals("")) {
            tMessage.setText(s);

            if (TRACE) {
                System.out.println(s);
            }
        }
    }
894240
public static <T> Object callMethod(Object obj,
                                        Class<T> c,
                                        String name,
                                        Class<?>[] classes,
                                        Object[] args) {
        try {
            Method m = getMethod(c, name, classes);
            return m.invoke(obj, args);
        } catch(InvocationTargetException e) {
            throw getCause(e);
        } catch(IllegalAccessException e) {
            throw new IllegalStateException(e);
        }
    }
242905
public void trace(Object message, Throwable exception) {
        log(Level.FINEST, String.valueOf(message), exception);
    }
827250
public function addReference($name, $object)
    {
        $ref = $this->references[$name] ?? null;
        if ($ref === $object) {
            return;
        }
        if ($ref !== null && !$ref instanceof UnknownElement) {
            $this->log("Overriding previous definition of reference to $name", Project::MSG_VERBOSE);
        }
        $refName = method_exists($object, 'toString') ? $object->toString() : get_class($object);
        $refName = method_exists($object, '__toString') ? (string) $object : $refName;
        $this->log("Adding reference: $name -> " . $refName, Project::MSG_DEBUG);
        $this->references[$name] = $object;
    }
284079
public function logFeature(string $class, string $method, array $args) : void
    {
        if (!isset($this->logged[$class])) {
            $this->logged[$class] = [];
        }
        if (!isset($this->logged[$class][$method])) {
            $this->logged[$class][$method] = [];
        }
        if (!in_array($args, $this->logged[$class][$method])) {
            $this->logged[$class][$method][] = $args;
        }
    }
645786
public void trace(Object message, Throwable exception) {
    log(Level.TRACE, message, exception);
  }
827349
public static function cached_object($obj, $class = null)
	{
		$class = $class ?: get_called_class();
		$id    = (is_int($obj) or is_string($obj)) ? (string) $obj : $class::implode_pk($obj);

		$result = ( ! empty(static::$_cached_objects[$class][$id])) ? static::$_cached_objects[$class][$id] : false;

		return $result;
	}
105770
public final Trace alert(Class<?> c, String message) {
        return _trace.alert(c, message);
    }
161599
public static function methods($object)
    {
        if (!self::isDebug()) {
            return false;
        }

        $methodst = self::i()->_getMethods($object);
        if (is_string($object)) {
            $className = $object;
        } else {
            $className = get_class($object);
        }

        return self::i()->dump($methodst, '&lt;! methods of "' . $className . '" !&gt;');
    }
401463
@Override
    public void debug(Object object) {
        if (isDebugEnabled()) {
            if (object instanceof Throwable) {
                debugThrowable((Throwable) object);
            } else {
                debugString("" + object);
            }
        }
    }
993801
@Override
    public void visitMethod(final Method obj) {
        methodName = obj.getName();
        if (Values.STATIC_INITIALIZER.equals(methodName) || Values.CONSTRUCTOR.equals(methodName)) {
            return;
        }

        List<String> parms = SignatureUtils.getParameterSignatures(obj.getSignature());

        if (!parms.isEmpty()) {
            boolean isStatic = obj.isStatic();
            isAbstract = obj.isAbstract();

            firstLocalReg = isStatic ? 0 : 1;
            for (String parmSig : parms) {
                firstLocalReg += SignatureUtils.getSignatureSize(parmSig);
            }

            sourceLines = getSourceLines(obj);
        }
    }
158016
@SuppressWarnings("unchecked")
    private void processManuallyTracedMethods(ClassTraceInfo info) {
        for (MethodNode mn : (List<MethodNode>) info.classNode.methods) {
            // Don't re-process methods that have already had trace injected
            if (isMethodAlreadyInjectedAnnotationPresent(mn)) {
                continue;
            }

            // Look through the method's instruction stream for well known entry/exit methods
            Iterator<? extends AbstractInsnNode> instructionIterator = mn.instructions.iterator();
            while (instructionIterator.hasNext()) {
                AbstractInsnNode insnNode = instructionIterator.next();

                // Look for calls to Tr.entry, Tr.exit, Logger.entering, Logger.exiting
                boolean manuallyTraced = false;
                if (insnNode.getType() == AbstractInsnNode.METHOD_INSN) {
                    MethodInsnNode methodInsn = (MethodInsnNode) insnNode;
                    String methodName = methodInsn.name;
                    if (methodInsn.owner.equals(LOGGER_TYPE.getInternalName())) {
                        manuallyTraced = (methodName.equals("entering") || methodName.equals("exiting"));
                    } else if (methodInsn.owner.equals(LIBERTY_TR_TYPE.getInternalName())) {
                        manuallyTraced = (methodName.equals("entry") || methodName.equals("exit"));
                    } else if (methodInsn.owner.equals(WEBSPHERE_TR_TYPE.getInternalName())) {
                        manuallyTraced = (methodName.equals("entry") || methodName.equals("exit"));
                    }
                }

                // Mark the manually traced method, and create a warning
                if (manuallyTraced) {
                    mn.visitAnnotation(MANUAL_TRACE_TYPE.getDescriptor(), true).visitEnd();

                    StringBuilder sb = new StringBuilder();
                    sb.append("WARNING: Hard coded entry/exit trace point found in ");
                    sb.append(info.classNode.name.replaceAll("/", "\\.")).append(".").append(mn.name).append(mn.desc);
                    sb.append(".  Skipping method.");
                    info.warnings.add(sb.toString());
                    break;
                }
            }
        }
    }