equal
deleted
inserted
replaced
4987 |
4987 |
4988 // <editor-fold defaultstate="collapsed" desc="Signature Generation"> |
4988 // <editor-fold defaultstate="collapsed" desc="Signature Generation"> |
4989 |
4989 |
4990 public static abstract class SignatureGenerator { |
4990 public static abstract class SignatureGenerator { |
4991 |
4991 |
|
4992 public static class InvalidSignatureException extends RuntimeException { |
|
4993 private static final long serialVersionUID = 0; |
|
4994 |
|
4995 private final Type type; |
|
4996 |
|
4997 InvalidSignatureException(Type type) { |
|
4998 this.type = type; |
|
4999 } |
|
5000 |
|
5001 public Type type() { |
|
5002 return type; |
|
5003 } |
|
5004 } |
|
5005 |
4992 private final Types types; |
5006 private final Types types; |
4993 |
5007 |
4994 protected abstract void append(char ch); |
5008 protected abstract void append(char ch); |
4995 protected abstract void append(byte[] ba); |
5009 protected abstract void append(byte[] ba); |
4996 protected abstract void append(Name name); |
5010 protected abstract void append(Name name); |
5031 break; |
5045 break; |
5032 case VOID: |
5046 case VOID: |
5033 append('V'); |
5047 append('V'); |
5034 break; |
5048 break; |
5035 case CLASS: |
5049 case CLASS: |
|
5050 if (type.isCompound()) { |
|
5051 throw new InvalidSignatureException(type); |
|
5052 } |
5036 append('L'); |
5053 append('L'); |
5037 assembleClassSig(type); |
5054 assembleClassSig(type); |
5038 append(';'); |
5055 append(';'); |
5039 break; |
5056 break; |
5040 case ARRAY: |
5057 case ARRAY: |
5073 throw new AssertionError(ta.kind); |
5090 throw new AssertionError(ta.kind); |
5074 } |
5091 } |
5075 break; |
5092 break; |
5076 } |
5093 } |
5077 case TYPEVAR: |
5094 case TYPEVAR: |
|
5095 if (((TypeVar)type).isCaptured()) { |
|
5096 throw new InvalidSignatureException(type); |
|
5097 } |
5078 append('T'); |
5098 append('T'); |
5079 append(type.tsym.name); |
5099 append(type.tsym.name); |
5080 append(';'); |
5100 append(';'); |
5081 break; |
5101 break; |
5082 case FORALL: |
5102 case FORALL: |