private static RegisteredType boxedFor(Pointer ptr, Class<?> klass, GType gtype) { try { Constructor<?> ctor = klass.getConstructor(new Class<?>[] { GType.class, Pointer.class, TypeMapper.class }); ctor.setAccessible(true); return (RegisteredType) ctor.newInstance(new Object[] { gtype, ptr, GTypeMapper.getInstance() }); } catch (Exception e) { throw new RuntimeException(e); } }
@NotNull public static Collection<String> getUtilClassPath() { final List<Class<?>> classes = Arrays.asList( PathManager.class, // module 'util' NotNull.class, // module 'annotations' SystemInfoRt.class, // module 'util-rt' Document.class, // jDOM Appender.class, // log4j THashSet.class, // trove4j PicoContainer.class, // PicoContainer TypeMapper.class, // JNA FileUtils.class, // JNA (jna-utils) PatternMatcher.class // OROMatcher ); final Set<String> classPath = new HashSet<String>(); for (Class<?> aClass : classes) { final String path = getJarPathForClass(aClass); if (path != null) { classPath.add(path); } } final String resourceRoot = getResourceRoot(PathManager.class, "/messages/CommonBundle.properties"); // platform-resources-en if (resourceRoot != null) { classPath.add(new File(resourceRoot).getAbsolutePath()); } return Collections.unmodifiableCollection(classPath); }
@Nonnull public static Collection<String> getUtilClassPath() { final Class<?>[] classes = {PathManager.class, // module 'util' Nonnull.class, // module 'annotations' SystemInfoRt.class, // module 'util-rt' Document.class, // jDOM Appender.class, // log4j THashSet.class, // trove4j PicoContainer.class, // PicoContainer TypeMapper.class, // JNA FileUtils.class, // JNA (jna-platform) PatternMatcher.class // OROMatcher }; final Set<String> classPath = new HashSet<String>(); for (Class<?> aClass : classes) { final String path = getJarPathForClass(aClass); if (path != null) { classPath.add(path); } } final String resourceRoot = getResourceRoot(PathManager.class, "/messages/CommonBundle.properties"); // platform-resources-en if (resourceRoot != null) { classPath.add(new File(resourceRoot).getAbsolutePath()); } return Collections.unmodifiableCollection(classPath); }
public BaseStructure(int alignType, TypeMapper mapper) { super(alignType, mapper); setAlignType(NotesNativeAPI.getPlatformAlignment()); }
public BaseStructure(Pointer p, int alignType, TypeMapper mapper) { super(p, alignType, mapper); setAlignType(NotesNativeAPI.getPlatformAlignment()); }
public BaseStructure(TypeMapper mapper) { super(mapper); setAlignType(NotesNativeAPI.getPlatformAlignment()); }
@NotNull public static Collection<String> getUtilClassPath() { final Class<?>[] classes = { PathManager.class, // module 'util' Flow.class, // module 'annotations' SystemInfoRt.class, // module 'util-rt' Document.class, // jDOM Appender.class, // log4j THashSet.class, // trove4j PicoContainer.class, // PicoContainer TypeMapper.class, // JNA FileUtils.class, // JNA (jna-platform) PatternMatcher.class, // OROMatcher Snappy.class // Snappy }; final Set<String> classPath = new HashSet<String>(); for (Class<?> aClass : classes) { final String path = getJarPathForClass(aClass); if (path != null) { classPath.add(path); } } final String annotationsRoot = getJarPathForClass(Flow.class); if (annotationsRoot != null && !annotationsRoot.endsWith(".jar")) { // We're running IDEA built from sources. Flow.class is under annotations-common, and NotNull.class is under annotations. Add both // roots to classpath. final File notNullRoot = new File(new File(annotationsRoot).getParentFile(), "annotations"); if (notNullRoot.exists()) { classPath.add(notNullRoot.getAbsolutePath()); } } final String resourceRoot = getResourceRoot(PathManager.class, "/messages/CommonBundle.properties"); // platform-resources-en if (resourceRoot != null) { classPath.add(new File(resourceRoot).getAbsolutePath()); } return Collections.unmodifiableCollection(classPath); }
protected BoxedUnion(TypeMapper mapper) { super(mapper); gtype = GType.INVALID; isNative = false; }
protected BoxedUnion(Pointer pointer, TypeMapper mapper) { super(mapper); useMemory(pointer); this.gtype = GType.fromClass(getClass()); isNative = true; }
protected BoxedUnion(GType gtype, Pointer pointer, TypeMapper mapper) { super(mapper); useMemory(pointer); this.gtype = gtype; isNative = true; }
public GBoxed(TypeMapper mapper) { this(); }
public GBoxed(Pointer ptr, TypeMapper typeMapper) { super(ptr); this.gtype = GType.fromClass(getClass()); }
public GBoxed(GType gtype, Pointer ptr, TypeMapper typeMapper) { this(gtype, ptr); }
protected BoxedStructure(TypeMapper mapper) { super(mapper); gtype = GType.INVALID; // Should not be used isNative = false; }
protected BoxedStructure(Pointer pointer, TypeMapper mapper) { super(mapper); useMemory(pointer); this.gtype = GType.fromClass(getClass()); isNative = true; }
protected BoxedStructure(GType gtype, Pointer pointer, TypeMapper mapper) { super(mapper); useMemory(pointer); this.gtype = gtype; isNative = true; }