{"id":434327,"date":"2024-01-19T09:15:21","date_gmt":"2024-01-19T08:15:21","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=idea&#038;p=434327"},"modified":"2025-12-08T16:09:30","modified_gmt":"2025-12-08T15:09:30","slug":"easy-hacks-how-to-create-inheritance-in-java","status":"publish","type":"idea","link":"https:\/\/blog.jetbrains.com\/en\/idea\/2024\/01\/easy-hacks-how-to-create-inheritance-in-java","title":{"rendered":"Easy Hacks: How To Create Inheritance In Java"},"content":{"rendered":"\n<p>Inheritance is one of the fundamental attributes of object-oriented programming, in Java and other programming languages. It lets you create classes that are derived from another class (base class or superclass) and reuse, extend, or modify the behavior of the superclass. This principle allows you to build class hierarchies and reuse existing code.<\/p>\n\n\n\n<p>Java itself uses inheritance everywhere: you will see many of the JDK classes inherit other classes, and every class in Java implicitly extends <code>java.lang.Object<\/code>. We won\u2019t focus on that too much in this post, and instead look at some examples of how you can use inheritance in your own code.<\/p>\n\n\n\n<p>Imagine you want to create <code>Employee<\/code> and <code>Customer<\/code> classes in your application. With inheritance, you could write both classes so they inherit the <code>name<\/code> and <code>address<\/code> properties from a parent <code>Person<\/code> class. There are several benefits to this in terms of code reusability and modularity, as you\u2019ll see throughout this post.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is inheritance in Java?<\/h2>\n\n\n\n<p>Let\u2019s continue with the example from the introduction: a hierarchy with a <code>Person<\/code>, <code>Employee<\/code> and <code>Customer<\/code> class. The <code>Person<\/code> class comes with a <code>name<\/code> property, a getter for that property, and a constructor:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class Person {\n    private final String name;\n\n    public Person(String name) {\n        this.name = name;\n    }\n\n    public String getName() {\n        return name;\n    }\n}<\/pre>\n\n\n\n<p>If you want to use the <code>Person<\/code> class in code, you can instantiate a new object from it and, for example, print its name to the console:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var person = new Person(\"Maarten\");\nSystem.out.println(person.getName());\n\n\/\/ Prints: Maarten<\/pre>\n\n\n\n<p>The <code>Employee<\/code> class will need a <code>name<\/code> and an <code>employeeId<\/code> property. Since an <code>Employee<\/code> shares a lot of characteristics with a person (at least until the robots rise up and steal all our jobs), you can reuse the <code>Person<\/code> class as a base.<\/p>\n\n\n\n<p>In Java, the base class is usually referred to as a <em>superclass<\/em>, while the class that inherits from it is called the <em>subclass<\/em>. You may also come across terminology like <em>parent class<\/em> to refer to the superclass, and <em>child class<\/em> to refer to the subclass.<\/p>\n\n\n\n<p>Here\u2019s an example of the <code>Employee<\/code> class, inheriting from the <code>Person<\/code> class:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class Employee extends Person {\n    private final int employeeId;\n\n    public Employee(String name, int employeeId) {\n        super(name);\n        this.employeeId = employeeId;\n    }\n\n    public int getEmployeeId() {\n        return employeeId;\n    }\n}<\/pre>\n\n\n\n<p>There are a couple of things to unpack here. First of all, the <code>extends<\/code> keyword is used to tell the Java compiler that <code>Employee extends Person<\/code>. Next, in the <code>Employee<\/code> constructor, you\u2019ll see the <code>super(name)<\/code> syntax that passes the <code>name<\/code> parameter into the superclass constructor, so that the underlying <code>Person<\/code> can store this property value.<\/p>\n\n\n\n<p>What\u2019s interesting about this is that, because we\u2019re using inheritance, <code>Employee<\/code> does not have to implement <code>name<\/code> itself. Yet, the <code>Employee<\/code> class now exposes two properties: <code>name<\/code> and <code>employeeId<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var employee = new Employee(\"Maarten\", 123);\nSystem.out.printf(\"%s (%s)\", employee.getName(), employee.getEmployeeId());\n\n\/\/ Prints: Maarten (123)<\/pre>\n\n\n\n<p>In a similar way, you can create a <code>Customer<\/code> class that also extends <code>Person<\/code>, and adds a <code>customerId<\/code> property of type <code>String<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class Customer extends Person {\n    private final String customerId;\n\n    public Customer(String name, String customerId) {\n        super(name);\n        this.customerId = customerId;\n    }\n\n    public String getCustomerId() {\n        return customerId;\n    }\n}<\/pre>\n\n\n\n<p>When using the <code>Customer<\/code> class, you\u2019ll get the <code>name<\/code> property and its getter from the <code>Person<\/code> superclass:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var customer = new Customer(\"Maarten\", \"ABC\");\nSystem.out.printf(\"%s (%s)\", customer.getName(), customer.getCustomerId());\n\n\/\/ Prints: Maarten (ABC)<\/pre>\n\n\n\n<p>As you can see from this example, inheritance lets you reuse properties and methods from the superclass in any subclass.<\/p>\n\n\n\n<p>If you\u2019re using IntelliJ IDEA, you can <a href=\"https:\/\/www.jetbrains.com\/help\/idea\/class-diagram.html\" target=\"_blank\" rel=\"noopener\">create a UML diagram<\/a> from these classes and visualize the hierarchy we have just created. Use the <em>Ctrl+Alt+Shift+D<\/em> shortcut on Windows\/Linux, or <em>\u2318\u0421md+\u2325Opt+\u21e7Shift+U<\/em> on macOS, or the context menu on a package or class in the <em>Project<\/em> tool window:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1600\" height=\"1460\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/image-26.png\" alt=\"\" class=\"wp-image-434355\"\/><\/figure>\n\n\n\n<p><em>Tip: Use the icons in the toolbar to toggle whether you want to display fields, constructors, methods, or properties.<\/em><\/p>\n\n\n\n<p>In some cases, you may want to be able to have a common superclass that cannot be instantiated, but with subclasses that can be. This is helpful when you have common properties or methods but it also makes no sense to use the superclass directly without the extras that subclasses add to it. In Java, you can use the <code>abstract<\/code> modifier to tell the compiler that the type name can be used, and the class can be inherited from, but you don\u2019t want new objects created directly:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public abstract class Person { } \/\/ can be inherited from, but not instantiated\nnew Person(); \/\/ does not work\npublic class Employee extends Person { } \/\/ can be inherited from &amp; instantiated\nnew Employee(); \/\/ works\npublic class Customer extends Person { } \/\/ can be inherited from &amp; instantiated\nnew Customer(); \/\/ works<\/pre>\n\n\n\n<p>Next to abstract classes, you can also define and inherit from interfaces. While an abstract class is typically expected to contain base implementations for some of its members, interfaces are more lightweight. An interface defines the members that are available on its subclasses, but doesn&#8217;t add an implementation. They are much like a contract.<\/p>\n\n\n\n<p>If you rewrite <code>Person<\/code> to be an interface, you can communicate to consumers of your code that a <code>Person<\/code> implementation will have a getter for the <code>name<\/code> property. There is, however, no implementation for that getter, nor is there a backing field to contain the name. Instead, the implementation of the interface will have to provide all that:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public interface Person {\n  String getName(); \/\/ consumers can expect this getter to exist, and subclasses have to provide an implementation\n}\n\nclass Employee implements Person {\n\n  @Override\n  public String getName() {\n      return \"\"; \/\/ may need a backing field, constructor, ...\n  }\n}<\/pre>\n\n\n\n<p>Note that here, instead of the <code>extends<\/code> keyword, interfaces are inherited from with the <code>implements<\/code> keyword.<\/p>\n\n\n\n<p>Now let\u2019s spice things up a little bit!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overriding methods from a Java class<\/h2>\n\n\n\n<p>In a class hierarchy, subclasses can override the behavior of the superclass. Let\u2019s extend our example a little bit, and add a <code>title<\/code> property and its getter to the <code>Employee<\/code> class.<\/p>\n\n\n\n<p><em>Tip: when you add <code>String title<\/code> as an argument in the constructor for <code>Employee<\/code>, you can use Alt+Enter (Windows\/Linux) or \u2325Opt+Enter (macOS) to let IntelliJ IDEA create a field and update existing usages:<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1600\" height=\"342\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/image-27.png\" alt=\"\" class=\"wp-image-434366\"\/><\/figure>\n\n\n\n<p>Here\u2019s the updated <code>Employee<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class Employee extends Person {\n    private final String title;\n    private final int employeeId;\n\n    public Employee(String name, String title, int employeeId) {\n        super(name);\n        this.title = title;\n        this.employeeId = employeeId;\n    }\n\n    public int getEmployeeId() {\n        return employeeId;\n    }\n\n    public String getTitle() {\n        return title;\n    }\n}<\/pre>\n\n\n\n<p>The <code>Employee<\/code> class can now represent various employees, with their title and ID:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var employee1 = new Employee(\"Maarten\", \"Developer Advocate\", 123);\nvar employee2 = new Employee(\"Hadi\", \"Developer Advocate\", 456);<\/pre>\n\n\n\n<p>As far as hierarchies go, <code>Employee<\/code> is a great example. But here\u2019s the problem: Hadi is actually a team lead, not just an <code>Employee<\/code>. How can we represent this? Time for more inheritance! Let\u2019s introduce a <code>TeamLead<\/code> subclass that inherits from <code>Employee<\/code>, and always suffixes the value returned in the getter for <code>title<\/code> with \u201c(team lead)\u201d:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class TeamLead extends Employee {\n\n    public TeamLead(String name, String title, int employeeId) {\n        super(name, title, employeeId);\n    }\n\n    @Override\n    public String getTitle() {\n        return super.getTitle() + \" (team lead)\";\n    }\n}<\/pre>\n\n\n\n<p>The implementation of the <code>TeamLead<\/code> class is quite straightforward: it reuses all code from the <code>Employee<\/code> superclass. However, it <em>overrides<\/em> the <code>getTitle()<\/code> getter implementation:<\/p>\n\n\n\n<ul>\n<li>The <code>@Override<\/code> annotation informs the Java compiler that you are overriding a method in the superclass. This helps the compiler warn you when the method does not exist, or doesn\u2019t have the same signature as the base.<\/li>\n\n\n\n<li>Using <code>super.getTitle()<\/code> calls into the getter from <code>Employee<\/code>, and the overridden version then appends a suffix before returning the value.<\/li>\n<\/ul>\n\n\n\n<p>You can use the <code>TeamLead<\/code> class and see the suffix being printed to the console:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var employee = new TeamLead(\"Hadi\", \"Developer Advocate\", 456);\n\nSystem.out.printf(\"%s (%s) - %s\", employee.getName(), employee.getEmployeeId(), employee.getTitle());\n\n\/\/ Prints: Hadi (456) - Developer Advocate (team lead)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Preventing inheritance with the <code>final<\/code> modifier<\/h2>\n\n\n\n<p>As they say, \u201cwith great power comes great responsibility\u201d, and that\u2019s true for inheritance as well. One superclass can have infinite subclasses \u2013 but this may not always be desirable. In our example, you may want to prevent <code>TeamLead<\/code> from having further subclasses or prevent inheritance from a certain class entirely..<\/p>\n\n\n\n<p>In Java, you can use the <code>final<\/code> modifier to set limitations on extensibility. You may have noticed <code>final<\/code> is being used for the <code>name<\/code> property in <code>Person<\/code>, effectively making it \u201cread-only\u201d and preventing it from being reassigned.<\/p>\n\n\n\n<p>The <code>final<\/code> modifier can also be used with inheritance. When <code>final<\/code> is applied to a class, you\u2019ll see inheriting from it is no longer possible. For example, when we add <code>final<\/code> to the <code>Employee<\/code> class, the <code>TeamLead<\/code> class we created in the previous section will no longer compile, and IntelliJ IDEA will also display an error message telling you that classes cannot inherit from <code>Employee<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1600\" height=\"936\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/image-29.png\" alt=\"\" class=\"wp-image-434388\"\/><\/figure>\n\n\n\n<p>You can also add the <code>final<\/code> modifier to methods in your class hierarchy. For example, if you want to prevent the <code>getTitle()<\/code> getter from being overridden, you can make it <code>final<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1600\" height=\"1440\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/image-28.png\" alt=\"\" class=\"wp-image-434377\"\/><\/figure>\n\n\n\n<p>If you want to prevent a class from being extended and limit inheritance to a couple of known subclasses, you can also use the <code>sealed<\/code> modifier and a <code>permits<\/code> clause:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public sealed class Person permits Employee { } \/\/ no other classes than Employee can extend Person<\/pre>\n\n\n\n<p>If you want to use <code>sealed<\/code> classes in your code, IntelliJ IDEA will help you generate the <code>permits<\/code> clause based on the existing class hierarchy and will update all classes in the hierarchy accordingly:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/image-30.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/01\/image-1.gif\" alt=\"Seal class with IntelliJ IDEA\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Inheritance and access level modifiers<\/h2>\n\n\n\n<p>Java has several access modifiers you can use to control the scope of classes, constructors, properties, methods, and other members.<\/p>\n\n\n\n<p>For classes, there are two access level modifiers: <code>public<\/code>, making the class available everywhere; and package-private, making the class available only in the package it\u2019s defined in.<\/p>\n\n\n\n<p>Looking at inheritance and class hierarchies, a <code>public<\/code> class can be inherited everywhere \u2013 in all packages and modules of your own code base, and in referencing code. Package-private classes can be inherited only within the same package, and are not available outside of this package. That is, unless they have the <code>final<\/code> modifier \u2013 then inheritance is altogether not allowed.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class A { } \/\/ available everywhere, can be inherited from in any package\nclass B { } \/\/ available in the current package, can be inherited from in the current package<\/pre>\n\n\n\n<p>At the member level, the same principle applies: you can use the <code>public<\/code> modifier to make a member available everywhere, or you can use <code>private<\/code> to make it available only within the same class. You can also use no modifier at all, which would make the member available in the package where the member is located.<\/p>\n\n\n\n<p>In addition, you can use the <code>protected<\/code> modifier to allow subclasses to access a specific member.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"wpcustom\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class C { \/\/ available everywhere, can be inherited from in any package\n  private int a; \/\/ available only within class C\n  public void b() { } \/\/ available everywhere\n  protected void c() \/\/ available only within class C and its subclasses in any package\n}<\/pre>\n\n\n\n<p>Here\u2019s a quick summary of access levels and where any given class member will be available:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Available in:<\/strong><\/td><td><strong>Class<\/strong><\/td><td><strong>Package<\/strong><\/td><td><strong>Subclass of same package<\/strong><\/td><td><strong>Subclass of another package<\/strong><\/td><td><strong>Anywhere<\/strong><\/td><\/tr><tr><td><code>public<\/code><\/td><td>\u2714<\/td><td>\u2714<\/td><td>\u2714<\/td><td>\u2714<\/td><td>\u2714<\/td><\/tr><tr><td><code>protected<\/code><\/td><td>\u2714<\/td><td>\u2714<\/td><td>\u2714<\/td><td>\u2714<\/td><td><\/td><\/tr><tr><td>package-private (no modifier)<\/td><td>\u2714<\/td><td>\u2714<\/td><td>\u2714<\/td><td><\/td><td><\/td><\/tr><tr><td><code>private<\/code><\/td><td>\u2714<\/td><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Going back to our example, you will see that the <code>nam<\/code>e field is <code>private<\/code>, which means that any subclass has to use the <code>getName()<\/code> getter to access its value. If you were to make it <code>protected<\/code>, the <code>name<\/code> field would be available in all subclasses of <code>Person<\/code>.<\/p>\n\n\n\n<p>While all access level modifiers are useful to define the scope where classes and their members are available, the <code>protected<\/code> modifier is quite useful when creating class hierarchies through inheritance. Your superclass can define protected fields or methods that can be accessed by subclasses but not by consumers of those classes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Drawbacks of inheritance<\/h2>\n\n\n\n<p>Inheritance has several benefits, such as code reusability and the ability to extend existing functionality. Common properties and behaviors can be defined in a superclass, and subclasses can inherit and build upon them and add or override functionality.<\/p>\n\n\n\n<p>There are some drawbacks, though, such as tight coupling between classes. Any changes to the superclass can affect all the subclasses. Having large class hierarchies may lead to complexity, especially in large projects where multiple levels of inheritance are involved.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>In this post, we\u2019ve looked at inheritance as a fundamental concept in Java programming. Inheritance enables the creation of new classes, known as child classes, by extending properties and behaviors from existing classes, known as superclasses, using the <code>extends<\/code> keyword. We&#8217;ve also covered abstract classes and interfaces.<\/p>\n\n\n\n<p>We&#8217;ve also seen the <code>final<\/code> modifier, which is used to prevent inheritance of a class or to prevent overriding a specific class member. By combining that with access level modifiers, you can define where classes can be inherited, and where class members are available.<\/p>\n\n\n\n<p><strong>Give it a <\/strong><a href=\"https:\/\/www.jetbrains.com\/idea\/\" target=\"_blank\" rel=\"noopener\"><strong>try in IntelliJ IDEA<\/strong><\/a><strong>!<\/strong><\/p>\n","protected":false},"author":118,"featured_media":434328,"comment_status":"closed","ping_status":"closed","template":"","categories":[4759,5088],"tags":[40,155,743],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/idea\/434327"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/idea"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/types\/idea"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/users\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/comments?post=434327"}],"version-history":[{"count":10,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/idea\/434327\/revisions"}],"predecessor-version":[{"id":666475,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/idea\/434327\/revisions\/666475"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media\/434328"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media?parent=434327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/categories?post=434327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/tags?post=434327"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/cross-post-tag?post=434327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}