package bluej.parser;
import java.util.Arrays;
import java.util.List;
import bluej.stride.generic.InteractionManager.Kind;
import threadchecker.OnThread;
import threadchecker.Tag;
public class PrimitiveTypeCompletion
extends AssistContent{
private final String type;
private final String description;
private PrimitiveTypeCompletion(String type, String description)
{
this.type = type;
this.description = description;
}
@Override
@OnThread(Tag.Any)
public String getName()
{
return type;
}
@Override
public List getParams()
{
return null;
}
@Override
public String getType()
{
return null;
}
@Override
public String getDeclaringClass()
{
return null;
}
@Override
public CompletionKind getKind()
{
return CompletionKind.TYPE;
}
@Override
public Kind getTypeKind()
{
return Kind.PRIMITIVE;
}
@Override
public String getJavadoc()
{
return description;
}
public static PrimitiveTypeCompletion primByte = new PrimitiveTypeCompletion("byte",
"The primitive byte type. If you are unsure whether you want byte or Byte, then choose byte (this type).");
public static PrimitiveTypeCompletion primShort = new PrimitiveTypeCompletion("short",
"The primitive short integer type. If you are unsure whether you want short or Short, then choose short (this type).");
public static PrimitiveTypeCompletion primInt = new PrimitiveTypeCompletion("int",
"The primitive integer (whole number) type. If you are unsure whether you want int or Integer, then choose int (this type).");
public static PrimitiveTypeCompletion primLong = new PrimitiveTypeCompletion("long",
"The primitive long integer type. If you are unsure whether you want long or Long, then choose long (this type).");
public static PrimitiveTypeCompletion primFloat = new PrimitiveTypeCompletion("float",
"The primitive single floating point type. If you are unsure whether you want float or Float, then choose float (this type).");
public static PrimitiveTypeCompletion primDouble = new PrimitiveTypeCompletion("double",
"The primitive double floating point type. If you are unsure whether you want double or Double, then choose double (this type).");
public static PrimitiveTypeCompletion primBoolean = new PrimitiveTypeCompletion("boolean",
"The primitive boolean (true or false) type. If you are unsure whether you want boolean or Boolean, then choose boolean (this type).");
public static PrimitiveTypeCompletion primChar = new PrimitiveTypeCompletion("char",
"The primitive character type. If you are unsure whether you want char or Character, then choose char (this type).");
public static PrimitiveTypeCompletion primVoid = new PrimitiveTypeCompletion("void",
"The empty type. If you are unsure whether you want void or Void, then choose void (this type).");
public static List allPrimitiveTypes()
{
return Arrays.asList(primByte, primShort, primInt, primLong, primFloat, primDouble, primBoolean, primChar, primVoid);
}
@Override
public Access getAccessPermission()
{
return null;
}
}
top,
use,
map,
class PrimitiveTypeCompletion
. PrimitiveTypeCompletion
. getName
. getParams
. getType
. getDeclaringClass
. getKind
. getTypeKind
. getJavadoc
. allPrimitiveTypes
. getAccessPermission
123 neLoCode
+ 0 LoComm