Examples of EnumKey


Examples of com.sun.jna.platform.win32.Advapi32Util.EnumKey

            // open subkey
            InfoKey infoKey = Advapi32Util.registryQueryInfoKey(
                    phkResult.getValue(), WinNT.KEY_ALL_ACCESS);

            for (int i = 0; i < infoKey.lpcSubKeys.getValue(); i++) {
                EnumKey enumKey = Advapi32Util.registryRegEnumKey(
                        phkResult.getValue(), i);
                subKey = Native.toString(enumKey.lpName);

                COMInfo comInfo = new COMInfo(subKey);

                phkResult2 = Advapi32Util.registryGetKey(phkResult.getValue(),
                        subKey, WinNT.KEY_ALL_ACCESS);
                InfoKey infoKey2 = Advapi32Util.registryQueryInfoKey(
                        phkResult2.getValue(), WinNT.KEY_ALL_ACCESS);

                for (int y = 0; y < infoKey2.lpcSubKeys.getValue(); y++) {
                    EnumKey enumKey2 = Advapi32Util.registryRegEnumKey(
                            phkResult2.getValue(), y);
                    String subKey2 = Native.toString(enumKey2.lpName);

                    if (subKey2.equals("InprocHandler32")) {
                        comInfo.inprocHandler32 = (String) Advapi32Util
View Full Code Here

Examples of com.sun.jna.platform.win32.Advapi32Util.EnumKey

            // open subkey
            InfoKey infoKey = Advapi32Util.registryQueryInfoKey(
                    phkResult.getValue(), WinNT.KEY_READ);

            for (int i = 0; i < infoKey.lpcSubKeys.getValue(); i++) {
                EnumKey enumKey = Advapi32Util.registryRegEnumKey(
                        phkResult.getValue(), i);
                subKey = Native.toString(enumKey.lpName);

                COMInfo comInfo = new COMInfo(subKey);

                phkResult2 = Advapi32Util.registryGetKey(phkResult.getValue(),
                        subKey, WinNT.KEY_READ);
                InfoKey infoKey2 = Advapi32Util.registryQueryInfoKey(
                        phkResult2.getValue(), WinNT.KEY_READ);

                for (int y = 0; y < infoKey2.lpcSubKeys.getValue(); y++) {
                    EnumKey enumKey2 = Advapi32Util.registryRegEnumKey(
                            phkResult2.getValue(), y);
                    String subKey2 = Native.toString(enumKey2.lpName);

                    if (subKey2.equals("InprocHandler32")) {
                        comInfo.inprocHandler32 = (String) Advapi32Util
View Full Code Here

Examples of net.sf.joafip.store.entity.EnumKey

    BobContainer bobContainer = new BobContainer();
    EnumForTest enumForTest = EnumForTest.VAL1;
    enumForTest.setObject(null);
    bobContainer.setObject1(enumForTest);
    final Map<EnumKey, Enum<?>> storedEnumMap = new PTreeMap<EnumKey, Enum<?>>();
    storedEnumMap.put(new EnumKey(EnumForTest.VAL1), EnumForTest.VAL1);
    store.setRoot(bobContainer, storedEnumMap);
    store.save(true, false);

    DATA_MANAGER_INTEGRITY_CHECKER.checkIntegrity(dataManager);
View Full Code Here

Examples of net.sf.joafip.store.entity.EnumKey

    list = new PLinkedList<BobContainer>();
    BobContainer bobContainer;
    bobContainer = new BobContainer();
    // store.storedMutableEnum(EnumForTest.VAL1);
    Map<EnumKey, Enum<?>> storedEnumMap = new PTreeMap<EnumKey, Enum<?>>();
    storedEnumMap.put(new EnumKey(EnumForTest.VAL1), EnumForTest.VAL1);
    bobContainer.setObject1(EnumForTest.VAL1);
    list.add(bobContainer);
    store.setRoot(list, storedEnumMap);
    store.save(true, false);

    logger.info("second add val1");
    list = (PLinkedList<BobContainer>) store.readAndGetRoot();
    bobContainer = new BobContainer();
    // store.storedMutableEnum(EnumForTest.VAL1);
    bobContainer.setObject1(EnumForTest.VAL1);
    list.add(bobContainer);
    store.save(true, false);

    Iterator<BobContainer> iterator;

    logger.info("first val1 to val2");
    store.readRoot();
    list = (PLinkedList<BobContainer>) store.getRoot();
    storedEnumMap = store.getStoredEnumMap();
    // store.storedMutableEnum(EnumForTest.VAL1);
    storedEnumMap.put(new EnumKey(EnumForTest.VAL1), EnumForTest.VAL1);
    // store.storedMutableEnum(EnumForTest.VAL2);
    storedEnumMap.put(new EnumKey(EnumForTest.VAL2), EnumForTest.VAL2);
    iterator = list.iterator();
    assertTrue(MUST_HAVE_NEXT_ELEMENT, iterator.hasNext());
    bobContainer = iterator.next();
    assertEquals(BAD_VALUE, EnumForTest.VAL1, bobContainer.getObject1());
    bobContainer.setObject1(EnumForTest.VAL2);
View Full Code Here

Examples of net.sf.joafip.store.entity.EnumKey

      StoreClassNotFoundException, StoreDataCorruptedException,
      StoreTooBigForSerializationException {
    final EnumForTest enumForTest = EnumForTest.VAL1;
    final Map<EnumKey, Enum<?>> storedEnumMap = new PTreeMap<EnumKey, Enum<?>>();
    // store.storedMutableEnum(enumForTest);
    storedEnumMap.put(new EnumKey(EnumForTest.VAL1), EnumForTest.VAL1);
    final Bob1 bob1 = new Bob1();
    bob1.setVal(0);
    enumForTest.setObject(bob1);
    store.setRoot(enumForTest, storedEnumMap);
    store.save(true, false);
View Full Code Here

Examples of net.sf.joafip.store.entity.EnumKey

      StoreClassNotFoundException, StoreDataCorruptedException,
      StoreTooBigForSerializationException {
    store.setRecordSaveActions(true);
    // store.storedMutableEnum(EnumForTest.VAL1);
    final Map<EnumKey, Enum<?>> storedEnumMap = new PTreeMap<EnumKey, Enum<?>>();
    storedEnumMap.put(new EnumKey(EnumForTest.VAL1), EnumForTest.VAL1);
    final EnumForTest enumForTest = EnumForTest.VAL1;
    enumForTest.setObject(new Bob1());
    final BobContainer bobContainer = new BobContainer();
    bobContainer.setObject1(enumForTest);
    store.setRoot(bobContainer, storedEnumMap);
View Full Code Here

Examples of net.sf.joafip.store.entity.EnumKey

        /**/enumClass, "values", new Class<?>[] {}, new Object[] {});
        if (storedEnumMap == null) {
          storedEnumMap = new PTreeMap<EnumKey, Enum<?>>();
        }
        for (final Enum<?> enumValue : enumArray) {
          final EnumKey enumkey = new EnumKey(enumValue);// NOPMD
          storedEnumMap.put(enumkey, enumValue);
        }
      } catch (final ReflectException exception) {
        throw new FilePersistenceException(exception);
      }
View Full Code Here

Examples of net.sf.joafip.store.entity.EnumKey

  }

  @Override
  @Deprecated
  public void setEnumState(final Enum<?> enumObject) throws StoreException {
    final EnumKey enumKey = new EnumKey(enumObject);
    final Map<EnumKey, Enum<?>> enumMap = storeRoot.getStoredEnumMap();
    try {
      ProxyManager2.forceLoad(enumMap.get(enumKey));
    } catch (final Exception exception) {
      throw new StoreException(exception);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.