38 lines
1.1 KiB
TeX
38 lines
1.1 KiB
TeX
|
%
|
||
|
% Java (Java SE 12, 2019-06-22)
|
||
|
%
|
||
|
\lstdefinelanguage{Java}{
|
||
|
morekeywords={
|
||
|
% normal keywords (without data types)
|
||
|
abstract,assert,break,case,catch,class,continue,default,
|
||
|
do,else,enum,exports,extends,final,finally,for,if,implements,
|
||
|
import,instanceof,interface,module,native,new,package,private,
|
||
|
protected,public,requires,return,static,strictfp,super,switch,
|
||
|
synchronized,this,throw,throws,transient,try,volatile,while,
|
||
|
% var is an identifier
|
||
|
var
|
||
|
},
|
||
|
morekeywords={[2] % data types
|
||
|
% primitive data types
|
||
|
boolean,byte,char,double,float,int,long,short,
|
||
|
% String
|
||
|
String,
|
||
|
% primitive wrapper types
|
||
|
Boolean,Byte,Character,Double,Float,Integer,Long,Short
|
||
|
% number types
|
||
|
Number,AtomicInteger,AtomicLong,BigDecimal,BigInteger,DoubleAccumulator,DoubleAdder,LongAccumulator,LongAdder,Short,
|
||
|
% other
|
||
|
Object,Void,void
|
||
|
},
|
||
|
morekeywords={[3] % literals
|
||
|
% reserved words for literal values
|
||
|
null,true,false,
|
||
|
},
|
||
|
sensitive,
|
||
|
morecomment = [l]//,
|
||
|
morecomment = [s]{/*}{*/},
|
||
|
morecomment = [s]{/**}{*/},
|
||
|
morestring = [b]",
|
||
|
morestring = [b]',
|
||
|
}
|