本文整理汇总了Java中org.eclipse.jdt.internal.compiler.lookup.TypeBinding.DOUBLE属性的典型用法代码示例。如果您正苦于以下问题:Java TypeBinding.DOUBLE属性的具体用法?Java TypeBinding.DOUBLE怎么用?Java TypeBinding.DOUBLE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.internal.compiler.lookup.TypeBinding
的用法示例。
在下文中一共展示了TypeBinding.DOUBLE属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBaseTypeBinding
private TypeBinding getBaseTypeBinding(char[] signature) {
switch (signature[0]) {
case 'I' :
return TypeBinding.INT;
case 'Z' :
return TypeBinding.BOOLEAN;
case 'V' :
return TypeBinding.VOID;
case 'C' :
return TypeBinding.CHAR;
case 'D' :
return TypeBinding.DOUBLE;
case 'B' :
return TypeBinding.BYTE;
case 'F' :
return TypeBinding.FLOAT;
case 'J' :
return TypeBinding.LONG;
case 'S' :
return TypeBinding.SHORT;
case 'N':
return TypeBinding.NULL;
default :
return null;
}
}
示例2: postConversionType
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
if (this.genericCast != null)
convertedType = this.genericCast;
int runtimeType = (this.implicitConversion & TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
switch (runtimeType) {
case T_boolean :
convertedType = TypeBinding.BOOLEAN;
break;
case T_byte :
convertedType = TypeBinding.BYTE;
break;
case T_short :
convertedType = TypeBinding.SHORT;
break;
case T_char :
convertedType = TypeBinding.CHAR;
break;
case T_int :
convertedType = TypeBinding.INT;
break;
case T_float :
convertedType = TypeBinding.FLOAT;
break;
case T_long :
convertedType = TypeBinding.LONG;
break;
case T_double :
convertedType = TypeBinding.DOUBLE;
break;
default :
}
if ((this.implicitConversion & TypeIds.BOXING) != 0) {
convertedType = scope.environment().computeBoxingType(convertedType);
}
return convertedType;
}
示例3: postConversionType
/**
* Returns the type of the expression after required implicit conversions. When expression type gets promoted
* or inserted a generic cast, the converted type will differ from the resolved type (surface side-effects from
* #computeConversion(...)).
* @return the type after implicit conversion
*/
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
int runtimeType = (this.implicitConversion & TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
switch (runtimeType) {
case T_boolean :
convertedType = TypeBinding.BOOLEAN;
break;
case T_byte :
convertedType = TypeBinding.BYTE;
break;
case T_short :
convertedType = TypeBinding.SHORT;
break;
case T_char :
convertedType = TypeBinding.CHAR;
break;
case T_int :
convertedType = TypeBinding.INT;
break;
case T_float :
convertedType = TypeBinding.FLOAT;
break;
case T_long :
convertedType = TypeBinding.LONG;
break;
case T_double :
convertedType = TypeBinding.DOUBLE;
break;
default :
}
if ((this.implicitConversion & TypeIds.BOXING) != 0) {
convertedType = scope.environment().computeBoxingType(convertedType);
}
return convertedType;
}
示例4: postConversionType
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length);
if (requiredGenericCast != null)
convertedType = requiredGenericCast;
int runtimeType = (this.implicitConversion & TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
switch (runtimeType) {
case T_boolean :
convertedType = TypeBinding.BOOLEAN;
break;
case T_byte :
convertedType = TypeBinding.BYTE;
break;
case T_short :
convertedType = TypeBinding.SHORT;
break;
case T_char :
convertedType = TypeBinding.CHAR;
break;
case T_int :
convertedType = TypeBinding.INT;
break;
case T_float :
convertedType = TypeBinding.FLOAT;
break;
case T_long :
convertedType = TypeBinding.LONG;
break;
case T_double :
convertedType = TypeBinding.DOUBLE;
break;
default :
}
if ((this.implicitConversion & TypeIds.BOXING) != 0) {
convertedType = scope.environment().computeBoxingType(convertedType);
}
return convertedType;
}
示例5: postConversionType
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
if (this.valueCast != null)
convertedType = this.valueCast;
int runtimeType = (this.implicitConversion & TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
switch (runtimeType) {
case T_boolean :
convertedType = TypeBinding.BOOLEAN;
break;
case T_byte :
convertedType = TypeBinding.BYTE;
break;
case T_short :
convertedType = TypeBinding.SHORT;
break;
case T_char :
convertedType = TypeBinding.CHAR;
break;
case T_int :
convertedType = TypeBinding.INT;
break;
case T_float :
convertedType = TypeBinding.FLOAT;
break;
case T_long :
convertedType = TypeBinding.LONG;
break;
case T_double :
convertedType = TypeBinding.DOUBLE;
break;
default :
}
if ((this.implicitConversion & TypeIds.BOXING) != 0) {
convertedType = scope.environment().computeBoxingType(convertedType);
}
return convertedType;
}
示例6: getType
private TypeBinding getType(char[] type) {
TypeBinding binding = null;
int length = type.length;
switch(length) {
case 1 :
switch (type[0]) {
case 'I' :
binding = TypeBinding.INT;
break;
case 'Z' :
binding = TypeBinding.BOOLEAN;
break;
case 'V' :
binding = TypeBinding.VOID;
break;
case 'C' :
binding = TypeBinding.CHAR;
break;
case 'D' :
binding = TypeBinding.DOUBLE;
break;
case 'B' :
binding = TypeBinding.BYTE;
break;
case 'F' :
binding = TypeBinding.FLOAT;
break;
case 'J' :
binding = TypeBinding.LONG;
break;
case 'S' :
binding = TypeBinding.SHORT;
break;
}
break;
default:
int dimensions = 0;
int start = 0;
while (type[start] == '[') {
start++;
dimensions++;
}
binding = this.environment.getType(CharOperation.splitOn('/', type, start + 1, length - 1));
if (dimensions != 0) {
binding = this.environment.createArrayType(binding, dimensions);
}
}
return binding;
}
示例7: generatePostIncrement
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
super.generatePostIncrement(currentScope, codeStream, postIncrement, valueRequired);
return;
}
lastFieldBinding = generateReadSequence(currentScope, codeStream);
codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
if (valueRequired) {
switch (lastFieldBinding.type.id) {
case TypeIds.T_long :
case TypeIds.T_double :
codeStream.dup2();
break;
default :
codeStream.dup();
break;
}
}
codeStream.generateEmulationForField(lastFieldBinding);
if ((lastFieldBinding.type == TypeBinding.LONG) || (lastFieldBinding.type == TypeBinding.DOUBLE)) {
codeStream.dup_x2();
codeStream.pop();
if (lastFieldBinding.isStatic()) {
codeStream.aconst_null();
} else {
generateReadSequence(currentScope, codeStream);
}
codeStream.dup_x2();
codeStream.pop();
} else {
codeStream.dup_x1();
codeStream.pop();
if (lastFieldBinding.isStatic()) {
codeStream.aconst_null();
} else {
generateReadSequence(currentScope, codeStream);
}
codeStream.dup_x1();
codeStream.pop();
}
codeStream.generateConstant(postIncrement.expression.constant, this.implicitConversion);
codeStream.sendOperator(postIncrement.operator, lastFieldBinding.type.id);
codeStream.generateImplicitConversion(postIncrement.preAssignImplicitConversion);
codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:46,代码来源:CodeSnippetQualifiedNameReference.java