import lombok.Data;
@Data
class Empleado {
private final Departamento departamento;
private final String nombre;
}
@Data
class Departamento {
| import java.util.function.BiConsumer; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| class SimpleClass { | |
| void methodA(String a, String b) { | |
| System.out.printf("%s %s%n", a, b); | |
| } | |
| } |
| import javax.swing.Box; | |
| import javax.swing.BoxLayout; | |
| import javax.swing.JButton; | |
| import javax.swing.JFrame; | |
| import javax.swing.JLabel; | |
| import javax.swing.JPanel; | |
| import javax.swing.JPasswordField; | |
| import javax.swing.JTextField; | |
| public class Mano { |
| if ( apparentlyImportantValue); | |
| doSomething(); |
import lombok.Data;
@Data
class Empleado {
private final Departamento departamento;
private final String nombre;
}
@Data
class Departamento {
Sooo...
I thought it would be easier to setup goimports to use it with vim, and probably it is, but I had a lot of problems on the way.
Here's a quick summary of what I did at the end.
Note: I already had go installed and my GOPATH envrionment variable set.
This example contains initially 3 java files:
SearchInPage has a dependency on HttpClient, this example is to show how Dagger 2 can be used as Dependency Injection framework.
With Dagger 2 we change the dependency by adding the @Inject annotation, and we add 2 more clases: a Module and a Component which will be used by Dagger 2 to generate the required code to satisfy the dependency injection
| var input = "elPj"; | |
| undefined | |
| var re = /^PJ|JJ/i | |
| undefined | |
| re.test(input) | |
| false | |
| input = "pJz" | |
| "pJz" | |
| re.test(input) | |
| true |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> | |
| <script type="application/javascript"> | |
| function random(inRange) { | |
| return Math.floor((Math.random()*inRange)+1); |
| import java.io.*; | |
| import java.net.URL; | |
| import java.util.*; | |
| import java.util.regex.*; | |
| import javax.servlet.http.*; | |
| import javax.servlet.http.HttpServletResponse; | |
| import org.eclipse.jetty.server.Request; | |
| import org.eclipse.jetty.server.Server; |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "regexp" | |
| "strings" | |
| ) |