Author: akazakov
Date: 2008-03-31 07:46:52 -0400 (Mon, 31 Mar 2008)
New Revision: 7203
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
Log:
JBIDE-1258
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-03-31
11:15:56 UTC (rev 7202)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-03-31
11:46:52 UTC (rev 7203)
@@ -109,19 +109,24 @@
}
public Type(String signature, IType source) {
- String erasureSignature = Signature.getTypeErasure(signature);
- String typeOfArraySiganture = Signature.getElementType(erasureSignature);
- fName = String.valueOf(Signature.toString(erasureSignature));
- if(!erasureSignature.equals(typeOfArraySiganture)) {
- // this is an array
- fIsArray = true;
- fTypeOfArrayElement = new Type(typeOfArraySiganture, source);
+ if(signature!=null) {
+ String erasureSignature = Signature.getTypeErasure(signature);
+ String typeOfArraySiganture = Signature.getElementType(erasureSignature);
+ fName = String.valueOf(Signature.toString(erasureSignature));
+ if(!erasureSignature.equals(typeOfArraySiganture)) {
+ // this is an array
+ fIsArray = true;
+ fTypeOfArrayElement = new Type(typeOfArraySiganture, source);
+ }
+ String[] signaturesOfParametersOfType = Signature.getTypeArguments(signature);
+ fParameters = new Type[signaturesOfParametersOfType.length];
+ for (int i = 0; i < signaturesOfParametersOfType.length; i++) {
+ fParameters[i] = new Type(signaturesOfParametersOfType[i], source);
+ }
+ } else {
+ fName = source.getFullyQualifiedName();
+ setParameters(new Type[0]);
}
- String[] signaturesOfParametersOfType = Signature.getTypeArguments(signature);
- fParameters = new Type[signaturesOfParametersOfType.length];
- for (int i = 0; i < signaturesOfParametersOfType.length; i++) {
- fParameters[i] = new Type(signaturesOfParametersOfType[i], source);
- }
fSource = source;
}
Show replies by date