/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: Type.java,v 1.8 2007/03/28 16:51:19 joehw Exp $
*/
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
*/
/**
* Factory method to instantiate object types. Returns a pre-defined
* instance for "java.lang.Object" and "java.lang.String".
*/
if (javaClassName == "java.lang.Object") {
}
else if (javaClassName == "java.lang.String") {
return Type.ObjectString;
}
else {
//
return new ObjectType(javaClassName);
}
}
/**
* Factory method to instantiate object types. Returns a pre-defined
* instance for java.lang.Object.class and java.lang.String.class.
*/
}
return Type.ObjectString;
}
else {
return new ObjectType(clazz);
}
}
/**
* Returns a string representation of this type.
*/
/**
* Returns true if this and other are identical types.
*/
/**
* Returns true if this type is a numeric type. Redefined in NumberType.
*/
public boolean isNumber() {
return false;
}
/**
* Returns true if this type has no object representaion. Redefined in
* ResultTreeType.
*/
public boolean implementedAsMethod() {
return false;
}
/**
* Returns true if this type is a simple type. Redefined in NumberType,
* BooleanType and StringType.
*/
public boolean isSimple() {
return false;
}
/**
* Returns the distance between two types. This measure is used to select
* the subclasses.
*/
}
/**
* Returns the signature of an internal type's external representation.
*/
/**
* Translates an object of this type to an object of type
* <code>type</code>.
* Expects an object of the former type and pushes an object of the latter.
*/
}
/**
* Translates object of this type to an object of type <code>type</code>.
* Expects an object of the former type and pushes an object of the latter
* if not boolean. If type <code>type</code> is boolean then a branchhandle
* list (to be appended to the false list) is returned.
*/
(BooleanType)type);
}
else {
}
return fl;
}
/**
* Translates an object of this type to an non-synthesized boolean. It
* does not push a 0 or a 1 but instead returns branchhandle list to be
* appended to the false list.
*/
BooleanType type) {
return null;
}
/**
* Translates an object of this type to the external (Java) type denoted
* by <code>clazz</code>. This method is used to translate parameters
* when external functions are called.
*/
}
/**
* Translates an external (Java) type denoted by <code>clazz</code> to
* an object of this type. This method is used to translate return values
* when external functions are called.
*/
}
/**
* Translates an object of this type to its boxed representation.
*/
}
/**
* Translates an object of this type to its unboxed representation.
*/
}
/**
* Returns the class name of an internal type's external representation.
*/
return(EMPTYSTRING);
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return POP;
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return null; // should never be called
}
return DUP; // default
}
}