1;(function() 2{ 3 // CommonJS 4 SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); 5 6 function Brush() 7 { 8 var keywords = 'abstract assert boolean break byte case catch char class const ' + 9 'continue default do double else enum extends ' + 10 'false final finally float for goto if implements import ' + 11 'instanceof int interface long native new null ' + 12 'package private protected public return ' + 13 'short static strictfp super switch synchronized this throw throws true ' + 14 'transient try void volatile while'; 15 16 this.regexList = [ 17 { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments 18 { regex: /\/\*([^\*][\s\S]*?)?\*\//gm, css: 'comments' }, // multiline comments 19 { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments 20 { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings 21 { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings 22 { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers 23 { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno 24 { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword 25 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword 26 ]; 27 28 this.forHtmlScript({ 29 left : /(<|<)%[@!=]?/g, 30 right : /%(>|>)/g 31 }); 32 }; 33 34 Brush.prototype = new SyntaxHighlighter.Highlighter(); 35 Brush.aliases = ['java']; 36 37 SyntaxHighlighter.brushes.Java = Brush; 38 39 // CommonJS 40 typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 41})(); 42