Compatible with: IntelliJ IDEA Android Studio
Oct 17, 2018
850
What is Manifold?

Manifold is a revolutionary new breed of Java tooling. It provides powerful features to make Java development more appealing and productive. Simply add the Manifold jar to your project and begin taking advantage of it.

What can you do with Manifold?

Meta-programming

Gain direct, type-safe access to structured data. Eliminate code generators. Minimize build time.

  // JSON files are types!
  Person person = Person.fromJsonUrl(url);
  person.setFirstName("Scott");

Extensions

Add extension methods and interfaces to existing Java classes, even String, List, and File. Eliminate boilerplate code.

  String greeting = "hello";
  greeting.myMethod(); // augment any type

Structural Typing

Unify disparate APIs. Bridge software components you do not control. Access maps through type-safe interfaces.

  MyInterface thing = (MyInterface)notMyInterface;
  thing.myMethod(); // treat as your interface

Templates

Make type-safe, templatized data files using pure Java. Use the same template expressions in Java strings.

  int hour = 8;
  // "It is 8 o'clock"
  String time = "It is $hour o'clock"; 

Libraries

Leverage stock Manifold extension libraries for standard Java classes. Save time and reduce boilerplate code.

  File file = new File(path);
  // Use refreshing extensions to File
  String content = file.readText(); 

IntelliJ

Use the Manifold IntelliJ IDEA plugin to fully leverage Manifold in your development cycle. The plugin provides comprehensive support for IntelliJ features including code completion, navigation, usage searching, refactoring, incremental compilation, hotswap debugging, full-featured template editing, and more.

Learn More

Download plugin

Recent change notes

- Support early access release of IJ 2018.3 and 2019

- Fixes relating to support for older versions of IJ
-- IJ 2017.3 is now the earliest supported version of IJ for Manifold
- Regardless of full rebuild or incremental build, avoid statically compiling a manifold type that is not referenced elsewhere in the compilation scope.
-- this is consistent with command line builds (javac, maven, gradle, etc.)
-- this change applies to builds using IIncrementalCompileDriver such as with Manifold's IJ JPS plugin
-- note @Precompile can still be used to force static compilation of any number of manifold types

- Back out use of Caffeine cache:
-- it causes deadlock with IJ CR 2019 plugin class loader during initialization
-- additionally, some rudimentary benchmarks demonstrated very little performance gain for our fqn cache

- Add ability for a type manifold to accept or reject working with a given module e.g., if the module's host is not a runtime host.
-- see ITypeManifold::accept(IModule)

- Improve support for JVM languages as type manifolds
-- An existing JVM language with its own bytecode compiler can avoid generating full Java source and instead generate a simple stub with just declarations for its contribute() method, Manifold will let it compile itself via ISelfCompiled/ISelfCompiledFile. This change is intended for languages such as Kotlin, Scala, Gosu, etc. where Manifold serves as a hub enabling polyglot applications with javac.

General usage instructions

http://manifold.systems/docs.html