Updated String type to Java 6/7.

One should find a better way than to hardcode all the interfaces String
implements and make them a system type too.


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1418 379699f6-c40d-0410-875b-85095c16579e
master
hoenicke 11 years ago
parent 33504d1840
commit e5c8e18a43
  1. 2
      jode/src/net/sf/jode/type/ReferenceType.java
  2. 26
      jode/src/net/sf/jode/type/Type.java

@ -26,7 +26,7 @@ import java.util.Vector;
import java.util.Enumeration;
/**
* This is an abstrace super class of all reference types. Reference
* This is an abstract super class of all reference types. Reference
* types are NullType, MultiClassType, and ClassType with its sub types
* ClassInfoType, SystemClassType, and ArrayType. <p>
*

@ -175,6 +175,22 @@ public class Type {
tSystemClass("java.lang.Comparable",
null, EMPTY_IFACES, false, true);
/**
* This type represents the singleton set containing
* <code>java.lang.Appendable</code>.
*/
public static final SystemClassType tAppendable =
tSystemClass("java.lang.Appendable",
null, EMPTY_IFACES, false, true);
/**
* This type represents the singleton set containing
* <code>java.lang.CharSequence</code>.
*/
public static final SystemClassType tCharSequence =
tSystemClass("java.lang.CharSequence",
null, EMPTY_IFACES, false, true);
/**
* This type represents the singleton set containing
* <code>java.lang.String</code>.
@ -182,7 +198,7 @@ public class Type {
public static final SystemClassType tString =
tSystemClass("java.lang.String",
tObject,
new ClassType[] { tSerializable, tComparable },
new ClassType[] { tSerializable, tComparable, tCharSequence },
true, false);
/**
* This type represents the singleton set containing
@ -190,15 +206,15 @@ public class Type {
*/
public static final SystemClassType tStringBuffer =
tSystemClass("java.lang.StringBuffer",
tObject, new ClassType[] { tSerializable },
tObject, new ClassType[] { tSerializable, tAppendable, tCharSequence },
true, false);
/**
* This type represents the singleton set containing
* <code>java.lang.StringBuffer</code>.
* <code>java.lang.StringBuilder</code>.
*/
public static final SystemClassType tStringBuilder =
tSystemClass("java.lang.StringBuilder",
tObject, new ClassType[] { tSerializable },
tObject, new ClassType[] { tSerializable, tAppendable, tCharSequence },
true, false);
/**
* This type represents the singleton set containing
@ -270,7 +286,7 @@ public class Type {
* Generate the singleton set of the type represented by the given
* class name.
* @param clazzname the interned full qualified name of the class.
* The packages mus be separated by `.'.
* The packages must be separated by `.'.
* @return a singleton set containing the given type.
*/
public static final SystemClassType tSystemClass

Loading…
Cancel
Save