/** Introspects. */
  private EmbeddableType introspectEmbeddableType(Class type) throws ConfigException, SQLException {
    getInternalEmbeddableConfig(type, _annotationCfg);
    Embeddable embeddableAnn = (Embeddable) _annotationCfg.getAnnotation();
    EmbeddableConfig embeddableConfig = _annotationCfg.getEmbeddableConfig();

    /*
    if (_annotationCfg.isNull())
      return null;
    */

    String typeName = type.getName();
    EmbeddableType embeddableType = _persistenceUnit.createEmbeddable(typeName, type);

    _configManager.addType(type, new EmbeddableConfig(type.getName(), this, embeddableType));

    try {
      boolean isField = isField(type, embeddableConfig);

      if (isField) embeddableType.setFieldAccess(true);

      // XXX: jpa/0u21
      Embeddable ann = (Embeddable) type.getAnnotation(javax.persistence.Embeddable.class);

      if (ann == null) {
        isField = true;
        embeddableType.setIdClass(true);

        _persistenceUnit.getAmberContainer().addEmbeddable(typeName, embeddableType);
      }

      embeddableType.setInstanceClassName(type.getName() + "__ResinExt");
      embeddableType.setEnhanced(true);

      if (isField)
        introspectFields(_persistenceUnit, embeddableType, null, type, embeddableConfig, true);
      else introspectMethods(_persistenceUnit, embeddableType, null, type, embeddableConfig);

    } catch (ConfigException e) {
      if (embeddableType != null) embeddableType.setConfigException(e);

      throw e;
    } catch (RuntimeException e) {
      if (embeddableType != null) embeddableType.setConfigException(e);

      throw e;
    }

    return embeddableType;
  }