Chapter 2. Syntax highlighting examples

2.1. Java example

Here is a java example with syntax highlighting

@Entity
@Table(name = "ATTACHMENT")
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public  class Attachment implements Comparable<Attachment>, Serializable {
	static final private long serialVersionUID = 1L;
	static final private Log logger = LogFactory.getLog(Attachment.class);

	// Raw Properties
	private String key;
	private String contentType;
	private byte[] binary;
	
	...
	
}

2.2. Java with callouts example

This is a java example with syntax highlighting and callouts

@Entity                                                                                  (1)
@Table(name = "ATTACHMENT")
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public  class Attachment implements Comparable<Attachment>, Serializable {
	static final private long serialVersionUID = 1L;
	static final private Log logger = LogFactory.getLog(Attachment.class);

	// Raw Properties
	private String key;
	private String contentType;
	private byte[] binary;                                                                  (2)
1

The @javax.persistence.Table annotation is JPA blabla

2

This is the last line: binary field

2.3. XML

This is XML with syntax highlighting

<security:anonymous />
<security:http-basic />
<security:logout
	logout-url="/logout.action"
	logout-success-url="/index.action"/>
<security:remember-me user-service-ref="accountDetailsServiceImpl"/>