/*
@see com.ibm.ws.tcpchannel.internal.ChannelSelector#introspectSelf()
513484
@Override
    public String[] introspectSelf() {
        List<String> rc = new ArrayList<String>();
        rc.add(Thread.currentThread().getName());
        rc.add("selectorTimeout: " + this.selectorTimeout);
        rc.add("usageCount: " + this.usageCount);
        rc.add("quit: " + this.quit);
        rc.add("waitingToQuit: " + this.waitingToQuit);
        rc.add("firstErrorTime: " + this.firstErrorTime + "=" + new Date(this.firstErrorTime));
        rc.add("Total exceptions: " + this.numExceptions);
        rc.add("\tIOExceptions on accept: " + this.numAcceptIOExceptions);
        rc.add("\tnull sockets on accept: " + this.numAcceptNulls);
        rc.add("\tIOExceptions on configure: " + this.numConfigureIOExceptions);
        rc.add("\tnumber of cancelled keys: " + this.numCancelledKeys);

        rc.add("# of keys=" + this.selector.keys().size());
        try {
            for (SelectionKey key : this.selector.keys()) {
                rc.add("key: " + key.channel());
            }
        } catch (Throwable x) {
            // If we get any exception, just return what we have so far.
            // This routine is not thread safe, and could get an exception, but
            // since it is only invoked when we are dumping data, due to a problem or
            // during debug this should be acceptable.
            rc.add("Exception Occurred Gathering Dump Data: " + x);
        }

        return rc.toArray(new String[rc.size()]);
    }
575654
private void introspect() {
    // Make sure the class is Embeddable
    if (!embeddableClass.isAnnotationPresent(Embeddable.class)) {
      String message = String.format("Class %s must have %s annotation", embeddableClass.getName(),
          Embeddable.class.getName());
      throw new EntityManagerException(message);
    }
    metadata = new EmbeddableMetadata(embeddableClass);
    processFields();
  }
617393
@Override
    public String[] introspectSelf() {
        String[] debugInfo = new String[6];
        debugInfo[0] = "JSMessageData:";

        // Include the basic toString info so we know who we are
        StringBuilder sb = new StringBuilder("Self: ");
        sb.append(toString());
        debugInfo[1] = new String(sb);

        // Include the cache information
        sb.setLength(0);
        sb.append("Cache: size=");
        sb.append(cacheSize);
        sb.append(" cache=");
        sb.append(cache); // Yes we really do just want [Ljava.lang.Object;@xxxxxx here
        debugInfo[2] = new String(sb);

        // Include the cache information
        sb.setLength(0);
        sb.append("Contents: ");
        if (contents == null) {
            sb.append("null");
        }
        else {
            sb.append("size=");
            sb.append(contents.length);
            sb.append(" contents=");
            sb.append(contents); // Yes we really do just want [B@xxxxxxx here
        }
        debugInfo[3] = new String(sb);

        // Include sharing information
        sb.setLength(0);
        sb.append("Sharing: sharedCache=");
        sb.append(sharedCache);
        sb.append(" sharedContents=");
        sb.append(sharedContents);
        debugInfo[4] = new String(sb);

        // Include all the stuff abot how it fits in to the heirarchy
        sb.setLength(0);
        sb.append("Context: parentMessage=");
        sb.append(parentMessage);
        sb.append(" containingMessage=");
        sb.append(containingMessage);
        sb.append(" master=");
        if (master == this) {
            sb.append("self");
        }
        else {
            sb.append(master);
        }
        sb.append(" compatibilityWrapperOrSelf=");
        if (compatibilityWrapperOrSelf == this) {
            sb.append("self");
        }
        else {
            sb.append(compatibilityWrapperOrSelf);
        }
        debugInfo[5] = new String(sb);

        // Now return it all
        return debugInfo;
    }
662856
def Introspect(self, object_path, connection):
        '''
        '''
        # temporarily add our dynamic methods
        cls = self.__class__.__module__ + '.' + self.__class__.__name__
        orig_interfaces = self._dbus_class_table[cls]

        mock_interfaces = orig_interfaces.copy()
        for interface, methods in self.methods.items():
            for method in methods:
                mock_interfaces.setdefault(interface, {})[method] = self.methods[interface][method][3]
        self._dbus_class_table[cls] = mock_interfaces

        xml = dbus.service.Object.Introspect(self, object_path, connection)

        tree = ElementTree.fromstring(xml)

        for name in self.props:
            # We might have properties for new interfaces we don't know about
            # yet. Try to find an existing <interface> node named after our
            # interface to append to, and create one if we can't.
            interface = tree.find(".//interface[@name='%s']" % name)
            if interface is None:
                interface = ElementTree.Element("interface", {"name": name})
                tree.append(interface)

            for prop, val in self.props[name].items():
                if val is None:
                    # can't guess type from None, skip
                    continue
                elem = ElementTree.Element("property", {
                    "name": prop,
                    # We don't store the signature anywhere, so guess it.
                    "type": dbus.lowlevel.Message.guess_signature(val),
                    "access": "readwrite"})

                interface.append(elem)

        xml = ElementTree.tostring(tree, encoding='utf8', method='xml').decode('utf8')

        # restore original class table
        self._dbus_class_table[cls] = orig_interfaces

        return xml
276451
@Override
  public void introspect(ContextH3 context)
  {
    if (_infoRef.get() != null) {
      return;
    }
    
    //_ctor = introspectConstructor();

    // XXX: needs to enumerate fields 
    FieldInfoH3[] fieldInfo = new FieldInfoH3[1];
    
    fieldInfo[0] = new FieldInfoH3("ordinal");

    ClassInfoH3 classInfo = new ClassInfoH3(_type.getName(), 
                                            ClassTypeH3.ENUM, 
                                            fieldInfo,
                                            _sequence);
    
    _infoRef.compareAndSet(null, classInfo); 
  }
227021
protected Method getGetter(Class type, String name)
    {
        return introspector(type).getGetter( toJavaIdentifierForm(name));
    }
121810
public static void introspect(Object bean, ServletRequest request) throws JspCoreException {
        Enumeration e = request.getParameterNames();
        while (e.hasMoreElements()) {
            String name = (String) e.nextElement();
            String value = request.getParameter(name);
            introspecthelper(bean, name, value, request, name, true);
        }
    }
302299
@Override
    public void introspect(final PrintWriter writer) throws Exception {
        // Put out a header before the information
        writer.println("Network Interface Information");
        writer.println("-----------------------------");

        // Extract the interface information inside a doPriv
        try {
            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
                @Override
                public Void run() throws IOException {
                    // Iterate over the system network interfaces
                    Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
                    while (interfaces.hasMoreElements()) {
                        getInterfaceInfo(interfaces.nextElement(), writer);
                    }
                    return null;
                }
            });
        } catch (PrivilegedActionException pae) {
            throw (Exception) pae.getCause();
        }

    }
1148009
public void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
        StringBuilder sb = new StringBuilder();
        method.addJavaDocLine("/**");
        if (StringUtility.stringHasValue(introspectedColumn.getRemarks())) {
            sb.append(" * 设置");
            sb.append(introspectedColumn.getRemarks());
            method.addJavaDocLine(sb.toString());
            method.addJavaDocLine(" *");
        }
        Parameter parm = method.getParameters().get(0);
        sb.setLength(0);
        sb.append(" * @param ");
        sb.append(parm.getName());
        if (StringUtility.stringHasValue(introspectedColumn.getRemarks())) {
            sb.append(" ");
            sb.append(introspectedColumn.getRemarks());
        }
        method.addJavaDocLine(sb.toString());
        method.addJavaDocLine(" */");
    }
525094
@Override
  public void introspect(ContextH3 context)
  {
    if (_infoRef.get() != null) {
      return;
    }

    _ctor = introspectConstructor();

    introspectFields();

    FieldInfoH3[] fieldInfo = new FieldInfoH3[1];

    fieldInfo[0] = _item.info();

    ClassInfoH3 classInfo
      = new ClassInfoH3(_type.getName(),
                        ClassTypeH3.LIST,
                        fieldInfo);

    _infoRef.compareAndSet(null, classInfo);
  }
367131
private static BeanInfo getBeanInfoOptional(Class<?> beanClass)
    {
        try
        {
            return Introspector.getBeanInfo(beanClass);
        } 
        catch (IntrospectionException e)
        {
            return null;
        }
    }
371006
@SuppressWarnings("unchecked")
    private List<PropertyDescriptor> introspectProperties(Method[] methodDescriptors) {

        // Get the list of public non-static methods into an array
        if (methodDescriptors == null) {
            return null;
        }

        HashMap<String, HashMap> propertyTable = new HashMap<>(methodDescriptors.length);

        // Search for methods that either get or set a Property
        for (Method methodDescriptor : methodDescriptors) {
            introspectGet(methodDescriptor, propertyTable);
            introspectSet(methodDescriptor, propertyTable);
        }

        // fix possible getter & setter collisions
        fixGetSet(propertyTable);

        // Put the properties found into the PropertyDescriptor array
        ArrayList<PropertyDescriptor> propertyList = new ArrayList<>();

        for (Map.Entry<String, HashMap> entry : propertyTable.entrySet()) {
            String propertyName = entry.getKey();
            HashMap table = entry.getValue();
            if (table == null) {
                continue;
            }
            String normalTag = (String) table.get(STR_NORMAL);

            if ((normalTag == null)) {
                continue;
            }

            Method get = (Method) table.get(STR_NORMAL + PREFIX_GET);
            Method set = (Method) table.get(STR_NORMAL + PREFIX_SET);

            PropertyDescriptor propertyDesc = new PropertyDescriptor(propertyName, get, set);
            propertyList.add(propertyDesc);
        }

        return Collections.unmodifiableList(propertyList);
    }
124529
private static <T> void setParamsExecute(final T target,
                                            final Introspected introspected,
                                            final FieldColumnInfo[] fcInfos,
                                            final PreparedStatement stmt,
                                            final boolean checkExistingId,
                                            final Set<String> excludedColumns) throws SQLException
   {
      final int[] parameterTypes = getParameterTypes(stmt);
      int parameterIndex = setStatementParameters(target, introspected, fcInfos, /*hasSelfJoinColumn*/ stmt, parameterTypes, excludedColumns);

      // If there is still a parameter left to be set, it's the ID used for an update
      if (parameterIndex <= parameterTypes.length) {
         for (final Object id : introspected.getActualIds(target)) {
            stmt.setObject(parameterIndex, id, parameterTypes[parameterIndex - 1]);
            ++parameterIndex;
         }
      }

      stmt.executeUpdate();
      fillGeneratedId(target, introspected, stmt, checkExistingId);
   }
437653
@Override
    public List<String> introspect() {
        List<String> rc = super.introspect();
        String prefix = getClass().getSimpleName() + "@" + hashCode() + ": ";
        rc.add(prefix + "callback=" + callback);
        return rc;
    }
130169
public List<String> introspect() {
        List<String> rc = new LinkedList<String>();
        rc.add(dumpChannelSelectorCounts(this.readInboundCount, "Read Inbound"));
        rc.add(dumpChannelSelectorCounts(this.readOutboundCount, "Read Outbound"));
        rc.add(dumpChannelSelectorCounts(this.writeInboundCount, "Write Inbound"));
        rc.add(dumpChannelSelectorCounts(this.writeOutboundCount, "Write Outbound"));
        rc.add(dumpChannelSelectorCounts(this.connectCount, "Connect"));
        return rc;
    }
1017845
public static Field convertToJavaBeansField(IntrospectedColumn introspectedColumn) {
        FullyQualifiedJavaType fqjt = introspectedColumn.getFullyQualifiedJavaType();
        String property = introspectedColumn.getJavaProperty();
        Field field = new Field();
        field.setVisibility(JavaVisibility.PRIVATE);
        field.setType(fqjt);
        field.setName(property);
        return field;
    }
1168405
public static void introspect(IntrospectionWriter writer)
    {
        writer.begin("Container Properties");
        writer.println("Property: AllowCachedTimerDataFor = " + AllowCachedTimerDataFor);//F001419
        writer.println("Property: AllowCustomFinderSQLForUpdate = " + AllowCustomFinderSQLForUpdate);
        writer.println("Property: AllowEarlyInsert        = " + AllowEarlyInsert);
        writer.println("Property: AllowPrimaryKeyMutation = " + AllowPrimaryKeyMutation);
        writer.println("Property: AllowSpecViolationOnRollback = " + AllowSpecViolationOnRollback); //PK87857
        writer.println("Property: AsyncResultNoResponseBackoff = " + AsyncNoResponseBackoff);
        writer.println("Property: BindToJavaGlobal        = " + BindToJavaGlobal);
        writer.println("Property: BindToServerRoot        = " + BindToServerRoot);
        writer.println("Property: BlockWorkUntilAppStarted = " + BlockWorkUntilAppStarted); // F743-15941
        writer.println("Property: BlockWorkUntilAppStartedWaitTime = " + BlockWorkUntilAppStartedWaitTime); // F743-15941
        writer.println("Property: CheckAppConfig          = " + CheckAppConfig); // F743-13921
        writer.println("Property: CreateInstanceAtStart   = " + CreateInstanceAtStart);
        writer.println("Property: DefaultSessionAccessTimeout = " + DefaultSessionAccessTimeout); // d704504
        writer.println("Property: DefaultStatefulSessionTimeout  = " + DefaultStatefulSessionTimeout); // F743-14726  d627044
        writer.println("Property: DisableAsyncMethods     = " + DisableAsyncMethods); // F743-13022
        writer.println("Property: DisableAsyncResultRetries = " + DisableAsyncResultRetries);
        writer.println("Property: DisableAutomaticLightweightMethods = " + DisableAutomaticLightweightMethods);
        writer.println("Property: DisableMDBs             = " + DisableMDBs); // F743-13023
        writer.println("Property: DisableRemote           = " + DisableRemote); // F743-13024.CdRv
        writer.println("Property: DisableShortDefaultBindings = " + DisableShortDefaultBindings);
        writer.println("Property: DisableTimers           = " + DisableTimers); // F743-13022
        writer.println("Property: DisablePersistentTimers = " + DisablePersistentTimers); // PI50798
        writer.println("Property: EE5Compatibility        = " + EE5Compatibility); // F743-14982CdRv
        writer.println("Property: EE6Compatibility        = " + EE6Compatibility); // RTC113949
        writer.println("Property: EmptyAnnotationIgnoresExplicitInterfaces = " +
                       EmptyAnnotationIgnoresExplicitInterfaces); // RTC113949
        writer.println("Property: ExcludeNestedExceptions = " + ExcludeNestedExceptions); // d672063
        writer.println("Property: ExpandCMPCFJNDIName     = " + ExpandCMPCFJNDIName); //d425164
        writer.println("Property: FbpkAlwaysReadOnly      = " + FbpkAlwaysReadOnly);
        writer.println("Property: IgnoreDuplicateEJBBindings = " + IgnoreDuplicateEJBBindings);
        writer.println("Property: IncludeNestedExceptions = " + IncludeNestedExceptions);
        writer.println("Property: IncludeNestedExceptionsExtended = " + IncludeNestedExceptionsExtended); //PK87857
        writer.println("Property: IndirectLocalProxies    = " + IndirectLocalProxies);
        writer.println("Property: InitializeEJBsAtStartup = " + InitializeEJBsAtStartup);
        writer.println("Property: MaxAsyncResultWaitTime  = " + MaxAsyncResultWaitTime);
        writer.println("Property: MaxUnclaimedAsyncResults = " + MaxUnclaimedAsyncResults); // d690014.1
        writer.println("Property: NoEJBPool               = " + NoEJBPool);
        writer.println("Property: NoPrimaryKeyMutation    = " + NoPrimaryKeyMutation);
        writer.println("Property: PassivationPolicy       = " + PassivationPolicy);
        writer.println("Property: PersistentTimerSingletonDeadlockTimeout = " + PersistentTimerSingletonDeadlockTimeout);
        writer.println("Property: PoolSize                = " + PoolSize);
        writer.println("Property: Portable                = " + Portable);
        writer.println("Property: PortableFinder          = " + PortableFinder);
        writer.println("Property: RMICCompatible          = " + RMICCompatible);
        writer.println("Property: StrictMaxCacheSize      = " + StrictMaxCacheSize);
        writer.println("Property: TimerCancelTimeout      = " + TimerCancelTimeout);
        writer.println("Property: TimerQOSAtLeastOnceForRequired = " + TimerQOSAtLeastOnceForRequired);
        writer.println("Property: ThrowRemoteFromEjb3Stub = " + ThrowRemoteFromEjb3Stub);
        writer.println("Property: UseFairSingletonLockingPolicy = " + UseFairSingletonLockingPolicy); // F743-9002
        writer.println("Property: UserInstallRoot         = " + UserInstallRoot);
        writer.println("Property: WLMAllowOptionAReadOnly = " + WLMAllowOptionAReadOnly);
        writer.println("Property: ExtendSetRollbackOnlyBehaviorBeyondInstanceFor = " +
                       ExtendSetRollbackOnlyBehaviorBeyondInstanceFor);
        writer.println("Property: LimitSetRollbackOnlyBehaviorToInstanceFor = " +
                       LimitSetRollbackOnlyBehaviorToInstanceFor);
        writer.end();
    }