|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.parser.util.ArrayListHeap
oracle.javatools.parser.java.v2.util.Conversions
public class Conversions
Various utilities that perform conversions from a subject to a target. Does not generate byte code.
Nested Class Summary | |
---|---|
static class |
Conversions.ConversionType Distinguish between various kinds of conversions |
Nested classes/interfaces inherited from interface oracle.javatools.parser.java.v2.JavaPreferences |
---|
JavaPreferences.MemberOrder |
Field Summary |
---|
Fields inherited from interface oracle.javatools.parser.java.v2.JavaOperators |
---|
OPT_ADD, OPT_ADDASG, OPT_AND, OPT_ANNOTATION, OPT_ARRAYCONST, OPT_ASG, OPT_base, OPT_BITAND, OPT_BITANDASG, OPT_BITNOT, OPT_BITOR, OPT_BITORASG, OPT_BITXOR, OPT_BITXORASG, OPT_CLASS_LITERAL, OPT_COND, OPT_DEREF, OPT_DIV, OPT_DIVASG, OPT_DOT, OPT_EQ, OPT_GE, OPT_GT, OPT_INSTANCEOF, OPT_invalid, OPT_INVOKE, OPT_LE, OPT_LIST, OPT_LITERAL, OPT_LSH, OPT_LSHASG, OPT_LT, OPT_max, OPT_MINUS, OPT_MINUSASG, OPT_MOD, OPT_MODASG, OPT_MUL, OPT_MULASG, OPT_NEGATIVE, OPT_NESTEXP, OPT_NEWARRAY, OPT_NEWOBJECT, OPT_NOT, OPT_NOTEQ, OPT_OR, OPT_POSITIVE, OPT_POSTDEC, OPT_POSTINC, OPT_precedence, OPT_PREDEC, OPT_PREINC, OPT_QUALIFIED_SUPER, OPT_QUALIFIED_THIS, OPT_RSH, OPT_RSHASG, OPT_SIMPLE_NAME, OPT_tokens, OPT_TYPE, OPT_TYPECAST, OPT_URSH, OPT_URSHASG, OPT_words |
Constructor Summary | |
---|---|
Conversions() |
Method Summary | |
---|---|
static boolean |
applyAssignmentConversion(JavaType subject, JavaType target, boolean isConstantValue, JavaProvider provider) JLS 5.2. |
static boolean |
applyAssignmentConversion(JavaType subject, SourceExpression subjectExpr, JavaType target, boolean isConstantValue, JavaProvider provider) Deprecated. Use applyAssignmentConversion(JavaType,SourceExpression,JavaType,boolean,JavaProvider,int) |
static boolean |
applyAssignmentConversion(JavaType subject, SourceExpression subjectExpr, JavaType target, boolean isConstantValue, JavaProvider provider, int j2se) JLS 5.2. |
protected static JavaType |
applyBinaryPromotion(JavaType lhs, JavaType rhs, int j2se) JLS 5.6.2. |
static JavaType |
applyBoxingConversion(PrimitiveType input, JavaProvider provider) Deprecated. Use applyBoxingConversion(PrimitiveType,JavaProvider,int) instead |
static JavaType |
applyBoxingConversion(PrimitiveType input, JavaProvider provider, int j2se) JLS 5.1.7. |
static boolean |
applyCastingConversion(JavaType subject, JavaType target, JavaProvider provider) Deprecated. Use applyCastingConversion(JavaType,JavaType,JavaProvider,int) instead |
static boolean |
applyCastingConversion(JavaType subject, JavaType target, JavaProvider provider, int j2se) JLS 5.5. |
static boolean |
applyMethodConversion(JavaType subject, JavaType target, boolean allowBoxing, JavaProvider provider) Deprecated. Use applyMethodConversion(JavaType,JavaType,boolean,JavaProvider,int) instead |
static boolean |
applyMethodConversion(JavaType subject, JavaType target, boolean allowBoxing, JavaProvider provider, int j2se) JLS 5.3. |
static boolean |
applyNarrowingConversion(PrimitiveType subject, PrimitiveType target) JLS 5.1.3. |
protected static JavaType |
applyUnaryPromotion(JavaType subject, int j2se) JLS 5.6.1. |
static PrimitiveType |
applyUnboxingConversion(JavaType input) Deprecated. Use applyUnboxingConversion(JavaType, int) instead |
static PrimitiveType |
applyUnboxingConversion(JavaType input, int j2se) JLS 5.1.8. |
static boolean |
applyWideningConversion(PrimitiveType subject, PrimitiveType target) JLS 5.1.2. |
static boolean |
hasSubsignatureOf(JavaMethod subject, JavaMethod target) JLS 8.4.2. |
static boolean |
inheritsFrom(JavaType subject, JavaType target) |
static boolean |
isSubtypeOf(JavaType subject, JavaType target) True if subject is a subtype of target. |
static boolean |
isSubtypeOfImpl(JavaType subject, JavaType target) subject and target are both assumed to not be primitive types or array types. |
static boolean |
isSubtypeOfImpl(JavaType subject, JavaType target, Conversions.ConversionType conversionType) |
Methods inherited from class oracle.javatools.parser.util.ArrayListHeap |
---|
allocArrayList, freeArrayList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Conversions()
Method Detail |
---|
public static boolean applyWideningConversion(PrimitiveType subject, PrimitiveType target)
public static boolean applyNarrowingConversion(PrimitiveType subject, PrimitiveType target)
@Deprecated
public static JavaType applyBoxingConversion(PrimitiveType input,
JavaProvider provider)
provider
- A JavaProvider is necessary in order to lookup the class that results from the boxing conversion.public static JavaType applyBoxingConversion(PrimitiveType input, JavaProvider provider, int j2se)
input
- The type to convertprovider
- A JavaProvider is necessary in order to lookup the class that results from the boxing conversion.j2se
- The JDK version to use, one of JavaConstants.J2SE_XXX
@Deprecated
public static PrimitiveType applyUnboxingConversion(JavaType input)
input
- A JavaType to convertpublic static PrimitiveType applyUnboxingConversion(JavaType input, int j2se)
input
- A JavaType to convertj2se
- The JDK version to use, one of JavaConstants.J2SE_XXXpublic static boolean applyAssignmentConversion(JavaType subject, JavaType target, boolean isConstantValue, JavaProvider provider)
subject
- - the right hand side of the assignmenttarget
- - the left hand side of the assigmentisConstantValue
- True if the subject value is known to be a constant value. The caller may decide to call twice, the first time without checking for a constant value. If the first call fails, then the caller may resolve to see if the subject value is a constant value and then call again. If you don't know how to determine if the subject value is a constant value, set this to false.provider
- A JavaProvider must be provided in order to lookup the boxing conversion.
@Deprecated
public static boolean applyAssignmentConversion(JavaType subject,
SourceExpression subjectExpr,
JavaType target,
boolean isConstantValue,
JavaProvider provider)
subject
- - the right hand side of the assignmentsubjectExpr
- - the expression whose JavaType is 'subject', which can be null. Used to properly handle 'subject's that are type parameterstarget
- - the left hand side of the assigmentisConstantValue
- True if the subject value is known to be a constant value. The caller may decide to call twice, the first time without checking for a constant value. If the first call fails, then the caller may resolve to see if the subject value is a constant value and then call again. If you don't know how to determine if the subject value is a constant value, set this to false.provider
- A JavaProvider must be provided in order to lookup the boxing conversion.public static boolean applyAssignmentConversion(JavaType subject, SourceExpression subjectExpr, JavaType target, boolean isConstantValue, JavaProvider provider, int j2se)
subject
- - the right hand side of the assignmentsubjectExpr
- - the expression whose JavaType is 'subject', which can be null. Used to properly handle 'subject's that are type parameterstarget
- - the left hand side of the assigmentisConstantValue
- True if the subject value is known to be a constant value. The caller may decide to call twice, the first time without checking for a constant value. If the first call fails, then the caller may resolve to see if the subject value is a constant value and then call again. If you don't know how to determine if the subject value is a constant value, set this to false.provider
- A JavaProvider must be provided in order to lookup the boxing conversion.j2se
- The JDK version to use, one of JavaConstants.J2SE_XXX
@Deprecated
public static boolean applyMethodConversion(JavaType subject,
JavaType target,
boolean allowBoxing,
JavaProvider provider)
subject
- The from typetarget
- The to typeallowBoxing
- If true, performs auto-boxing.provider
- A JavaProvider must be provided in order to lookup the boxing conversion. If boxing is not allowed, then no provider is needed.public static boolean applyMethodConversion(JavaType subject, JavaType target, boolean allowBoxing, JavaProvider provider, int j2se)
subject
- The from typetarget
- The to typeallowBoxing
- If true, performs auto-boxing.provider
- A JavaProvider must be provided in order to lookup the boxing conversion. If boxing is not allowed, then no provider is needed.j2se
- The JDK version to use, one of JavaConstants.J2SE_XXX
@Deprecated
public static boolean applyCastingConversion(JavaType subject,
JavaType target,
JavaProvider provider)
subject
- The from typetarget
- The to typeprovider
- The provider to use for looking up typespublic static boolean applyCastingConversion(JavaType subject, JavaType target, JavaProvider provider, int j2se)
subject
- The from typetarget
- The to typeprovider
- The provider to use for looking up typesj2se
- The JDK version to use, one of JavaConstants.J2SE_XXXpublic static boolean inheritsFrom(JavaType subject, JavaType target)
subject
- Must be a reference type. Behavior is unpredictable otherwise.target
- Must be a reference type. Behavior is unpredictable otherwise.public static boolean isSubtypeOf(JavaType subject, JavaType target)
public static boolean isSubtypeOfImpl(JavaType subject, JavaType target)
public static boolean isSubtypeOfImpl(JavaType subject, JavaType target, Conversions.ConversionType conversionType)
protected static JavaType applyUnaryPromotion(JavaType subject, int j2se)
protected static JavaType applyBinaryPromotion(JavaType lhs, JavaType rhs, int j2se)
public static boolean hasSubsignatureOf(JavaMethod subject, JavaMethod target)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |