⚇ ddot.it Java Reader

A ddot.it reader for Java source files. It recognizes triples in line comments, block comments, and Javadoc comments.

NOTE: Some examples use the ddot.it/this command.

Standard Syntax

Line Comments

// ddot.it/this ..project.. Code Red

Block Comments

/*
 * ddot.it/this ..project.. Code Red
 * ..team.. Platform
 */

Javadoc Comments

/**
 * Processes the incoming request.
 *
 * ddot.it/this ..type.. service
 * ..depends on.. UserRepository
 */
public class RequestProcessor {

Extra Syntax

Annotations

Ddot.it triples can be embedded in string-valued annotation attributes. This requires creating a custom annotation. The Java reader ignores the annotation package. Any annotation named DdotIt works. It may take one or multiple string values. Multiple string values are considered newline-separated.

@DdotIt("ddot.it/this ..status.. deprecated ..replacement.. NewProcessor")
public class MyFactory {
    
}

Annotation Code

package it.ddot;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation to embed ddot.it triples into Java bytecode.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.PACKAGE})
public @interface DdotIt {
    String[] value();
}