All Projects â†’ manifold-systems â†’ Manifold

manifold-systems / Manifold

Licence: apache-2.0
Manifold plugs into Java to supplement it with powerful features, from Type-safe Metaprogramming (direct access to GraphQL, JSON, XML, etc.), Extension Methods, Operator Overloading, and Unit Expressions to an integrated Template Engine and a Preprocessor. All fully supported in IntelliJ IDEA and Android Studio. Simply add Manifold to your project and begin taking advantage of it.

Programming Languages

java
68154 projects - #9 most used programming language
metaprogramming
66 projects

Projects that are alternatives of or similar to Manifold

Jbuilder
Generate JSON objects with a Builder-style DSL, inspired by jbuilder
Stars: ✭ 37 (-96.27%)
Mutual labels:  json, template-engine
Intellij Rainbow Brackets
🌈Rainbow Brackets for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio
Stars: ✭ 3,663 (+268.88%)
Mutual labels:  intellij, android-studio
Http Rpc
Lightweight REST for Java
Stars: ✭ 298 (-69.99%)
Mutual labels:  json, template-engine
Dotnet Fake Json Server
Fake JSON Server is a Fake REST API that can be used as a Back End for prototyping or as a template for a CRUD Back End.
Stars: ✭ 265 (-73.31%)
Mutual labels:  graphql, json
Runconfigurationasaction
Provides a way to use IntelliJ run configurations as buttons
Stars: ✭ 17 (-98.29%)
Mutual labels:  intellij, android-studio
Idea Android Studio Plugin
Android Studio Plugin
Stars: ✭ 293 (-70.49%)
Mutual labels:  intellij, android-studio
Jseg
A super simple, in-memory, JS graph database.
Stars: ✭ 344 (-65.36%)
Mutual labels:  graphql, json
TranslationPlugin
Translation plugin for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio.
Stars: ✭ 9,375 (+844.11%)
Mutual labels:  intellij, android-studio
Quicktype
Generate types and converters from JSON, Schema, and GraphQL
Stars: ✭ 7,459 (+651.16%)
Mutual labels:  graphql, json
Js Graphql Intellij Plugin
GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
Stars: ✭ 686 (-30.92%)
Mutual labels:  graphql, intellij
GapStyle
The world-first* productivity-oriented color scheme for intelliJ and VSCode to fill the gap between programming languages and human.
Stars: ✭ 111 (-88.82%)
Mutual labels:  intellij, android-studio
Graphql Config
One configuration for all your GraphQL tools (supported by most tools, editors & IDEs)
Stars: ✭ 883 (-11.08%)
Mutual labels:  graphql, intellij
eventbus-plugin
IntelliJ iDEA plugin to work with projects using greenrobot's EventBus library
Stars: ✭ 25 (-97.48%)
Mutual labels:  intellij, android-studio
Docpad
Empower your website frontends with layouts, meta-data, pre-processors (markdown, jade, coffeescript, etc.), partials, skeletons, file watching, querying, and an amazing plugin system. DocPad will streamline your web development process allowing you to craft powerful static sites quicker than ever before.
Stars: ✭ 3,035 (+205.64%)
Mutual labels:  template-engine, preprocessor
interstellar
Dark editor theme for JetBrains IDEs
Stars: ✭ 26 (-97.38%)
Mutual labels:  intellij, android-studio
Intellij Idea Tutorial
IntelliJ IDEA 简体中文专题教程
Stars: ✭ 19,071 (+1820.54%)
Mutual labels:  intellij, android-studio
SideMirror
An Android Studio plugin to mirror your android devices with scrcpy directly from Android Studio.
Stars: ✭ 49 (-95.07%)
Mutual labels:  intellij, android-studio
san-jose-theme
A custom Terminal & IntelliJ theme (inspired by PatMurrayDEV -> Apple's WWDC 2017 session slides)
Stars: ✭ 64 (-93.55%)
Mutual labels:  intellij, android-studio
Stash
An organizer for your porn, written in Go
Stars: ✭ 591 (-40.48%)
Mutual labels:  graphql, json
Servicestack.java
ServiceStack Java Libraries and Apps
Stars: ✭ 10 (-98.99%)
Mutual labels:  intellij, android-studio

What is Manifold?

Manifold plugs into Java to supplement it with powerful features, including:

All fully supported in Java 8 - 16 with comprehensive IDE support in IntelliJ IDEA and Android Studio. Simply add Manifold to your existing project and begin taking advantage of it.

New!

What can you do with Manifold?

Meta-programming

Use the framework to gain direct, type-safe access to any type of resource, such as GraphQL, JSON, XML, YAML, CSV, and even other languages such as JavaScript. Remove the code gen step in your build process.  â–¶ Check it out!

GraphQL: Use types defined in .graphql files directly, no code gen steps! Make GraphQL changes and immediately use them with code completion.

var query = MovieQuery.builder(Action).build();
var result = query.request("http://example.com/graphql").post();
var actionMovies = result.getMovies();
for (var movie : actionMovies) {
  out.println(
    "Title: " + movie.getTitle() + "\n" +
    "Genre: " + movie.getGenre() + "\n" +
    "Year: " + movie.getReleaseDate().getYear() + "\n");
}

JSON: Use .json schema files directly and type-safely, no code gen steps! Find usages of .json properties in your Java code.

// From User.json
User user = User.builder("myid", "mypassword", "Scott")
  .withGender(male)
  .withDob(LocalDate.of(1987, 6, 15))
  .build();
User.request("http://api.example.com/users").postOne(user);

Extension Methods

Add your own methods to existing Java classes, even String, List, and File. Eliminate boilerplate code.  â–¶ Check it out!

String greeting = "hello";
greeting.myMethod(); // Add your own methods to String!

Operator Overloading

Implement operator methods on any type to directly support arithmetic, relational, index, and unit operators.

// BigDecimal expressions
if (bigDec1 > bigDec2) {
  BigDecimal result = bigDec1 + bigDec2;
  ...
}
// Implement operators for any type
MyType value = myType1 + myType2;

Unit Expressions

Unit or binding operations are unique to the Manifold framework. They provide a powerfully concise syntax and can be applied to a wide range of applications.

import static manifold.science.util.UnitConstants.*; // kg, m, s, ft, etc
...
Length distance = 100 mph * 3 hr;
Force f = 5.2 kg m/s/s; // same as 5.2 N
Mass infant = 9 lb + 8.71 oz;

Ranges

Easily work with the Range API using unit expressions. Simply import the RangeFun constants to create ranges.

// imports the `to`, `step`, and other "binding" constants
import static manifold.collections.api.range.RangeFun.*;
...
for (int i: 1 to 5) {
  out.println(i);
}

for (Mass m: 0kg to 10kg step 22r unit g) {
  out.println(m);
}

Science

Use the manifold-science framework to type-safely incorporate units and precise measurements into your applications.

import static manifold.science.util.UnitConstants.*; // kg, m, s, ft, etc.
...
Velocity rate = 65mph;
Time time = 1min + 3.7sec;
Length distance = rate * time;

Preprocessor

Use familiar directives such as #define and #if to conditionally compile your Java projects. The preprocessor offers a simple and convenient way to support multiple build targets with a single codebase.  â–¶ Check it out!

#if JAVA_8_OR_LATER
  @Override
  public void setTime(LocalDateTime time) {...}
#else
  @Override
  public void setTime(Calendar time) {...}
#endif

Structural Typing

Unify disparate APIs. Bridge software components you do not control. Access maps through type-safe interfaces.  â–¶ Check it out!

Map<String, Object> map = new HashMap<>();
MyThingInterface thing = (MyThingInterface) map; // O_o
thing.setFoo(new Foo());
Foo foo = thing.getFoo();
out.println(thing.getClass()); // prints "java.util.HashMap"

Type-safe Reflection

Access private features with @Jailbreak to avoid the drudgery and vulnerability of Java reflection.  â–¶ Check it out!

@Jailbreak Foo foo = new Foo();
// Direct, *type-safe* access to *all* foo's members
foo.privateMethod(x, y, z);
foo.privateField = value;

Checked Exception Handling

You now have an option to make checked exceptions behave like unchecked exceptions! No more unintended exception swallowing. No more try/catch/wrap/rethrow boilerplate!

List<String> strings = ...;
List<URL> urls = list
  .map(URL::new) // No need to handle the MalformedURLException!
  .collect(Collectors.toList());

String Templates

Embed variables and expressions in String literals, no more clunky string concat!  â–¶ Check it out!

int hour = 15;
// Simple variable access with '$'
String result = "The hour is $hour"; // Yes!!!
// Use expressions with '${}'
result = "It is ${hour > 12 ? hour-12 : hour} o'clock";

A Java Template Engine

Author template files with the full expressive power of Java, use your templates directly in your code as types. Supports type-safe inclusion of other templates, shared layouts, and more.  â–¶ Check it out!

List<User> users = ...;
String content = abc.example.UserSample.render(users);

A template file abc/example/UserSample.html.mtl

<%@ import java.util.List %>
<%@ import com.example.User %>
<%@ params(List<User> users) %>
<html lang="en">
<body>
<% users.stream()
   .filter(user -> user.getDateOfBirth() != null)
   .forEach(user -> { %>
    User: ${user.getName()} <br>
    DOB: ${user.getDateOfBirth()} <br>
<% }); %>
</body>
</html>

IDE Support

Use the Manifold plugin to fully leverage Manifold with IntelliJ IDEA and Android Studio. The plugin provides comprehensive support for Manifold including code completion, navigation, usage searching, refactoring, incremental compilation, hotswap debugging, full-featured template editing, integrated preprocessor, and more.

manifold ij plugin

Projects

The Manifold project consists of the core Manifold framework and a collection of sub-projects implementing SPIs provided by the core framework. Each project consists of one or more dependencies you can easily add to your project:

Manifold : Core

Manifold : Java Extensions

Manifold : GraphQL
Manifold : JSON
Manifold : XML
Manifold : YAML
Manifold : CSV
Manifold : Properties
Manifold : Image
Manifold : Dark Java
Manifold : JavaScript

Manifold : Java Templates

Manifold : String Interpolation
Manifold : (Un)checked Exceptions

Manifold : Preprocessor

Manifold : Science

Manifold : Collections
Manifold : I/0
Manifold : Text

Experiment with sample projects:

Forum

Join our Slack Group to start a discussion, ask questions, provide feedback, etc. Someone is usually there to help.

Learn More


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].