Added getRangeType() to PrimitiveType enum.
This commit is contained in:
@@ -40,14 +40,18 @@ public enum PrimitiveType {
|
||||
|
||||
private final Name typeName;
|
||||
private final Name arrayTypeName;
|
||||
private final Name rangeTypeName;
|
||||
private final ClassName className;
|
||||
private final ClassName arrayClassName;
|
||||
private final ClassName rangeClassName;
|
||||
|
||||
private PrimitiveType(String typeName) {
|
||||
this.typeName = Name.identifier(typeName);
|
||||
this.arrayTypeName = Name.identifier(typeName + "Array");
|
||||
this.rangeTypeName = Name.identifier(typeName + "Range");
|
||||
this.className = new ClassName(JetStandardClasses.STANDARD_CLASSES_FQNAME.child(this.typeName), 0);
|
||||
this.arrayClassName = new ClassName(JetStandardClasses.STANDARD_CLASSES_FQNAME.child(this.arrayTypeName), 0);
|
||||
this.rangeClassName = new ClassName(JetStandardClasses.STANDARD_CLASSES_FQNAME.child(this.rangeTypeName), 0);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -60,6 +64,11 @@ public enum PrimitiveType {
|
||||
return arrayTypeName;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Name getRangeTypeName() {
|
||||
return rangeTypeName;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ClassName getClassName() {
|
||||
return className;
|
||||
@@ -69,4 +78,9 @@ public enum PrimitiveType {
|
||||
public ClassName getArrayClassName() {
|
||||
return arrayClassName;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ClassName getRangeClassName() {
|
||||
return rangeClassName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user