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 12 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; 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 * types are NullType, MultiClassType, and ClassType with its sub types
* ClassInfoType, SystemClassType, and ArrayType. <p> * ClassInfoType, SystemClassType, and ArrayType. <p>
* *

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

Loading…
Cancel
Save