1 19 20 package org.netbeans.lib.lexer.token; 21 22 import org.netbeans.api.lexer.PartType; 23 import org.netbeans.api.lexer.TokenId; 24 25 34 35 public class CustomTextToken<T extends TokenId> extends DefaultToken<T> { 36 37 private final CharSequence text; 39 private final PartType partType; 41 46 public CustomTextToken(T id, int length, CharSequence text, PartType partType) { 47 super(id, length); 48 assert (text != null); 49 this.text = text; 50 this.partType = partType; 51 } 52 53 @Override 54 public final CharSequence text() { 55 return text; 56 } 57 58 @Override 59 protected String dumpInfoTokenType() { 60 return "CusT"; } 62 63 } 64 | Popular Tags |