< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/types/Type.java

Print this page




 897     private static final ConcurrentMap<String, Type> cacheByName = new ConcurrentHashMap<>();
 898 
 899     /**
 900      * This is the boolean singleton, used for all boolean types
 901      */
 902     public static final Type BOOLEAN = putInCache(new BooleanType());
 903 
 904     /**
 905      * This is an integer type, i.e INT, INT32.
 906      */
 907     public static final BitwiseType INT = putInCache(new IntType());
 908 
 909     /**
 910      * This is the number singleton, used for all number types
 911      */
 912     public static final NumericType NUMBER = putInCache(new NumberType());
 913 
 914     /**
 915      * This is the long singleton, used for all long types
 916      */
 917     public static final BitwiseType LONG = putInCache(new LongType());
 918 
 919     /**
 920      * A string singleton
 921      */
 922     public static final Type STRING = putInCache(new ObjectType(String.class));
 923 
 924     /**
 925      * This is the CharSequence singleton used to represent JS strings internally
 926      * (either a {@code java.lang.String} or {@code jdk.nashorn.internal.runtime.ConsString}.
 927      */
 928     public static final Type CHARSEQUENCE = putInCache(new ObjectType(CharSequence.class));
 929 
 930 
 931     /**
 932      * This is the object singleton, used for all object types
 933      */
 934     public static final Type OBJECT = putInCache(new ObjectType());
 935 
 936     /**
 937      * A undefined singleton




 897     private static final ConcurrentMap<String, Type> cacheByName = new ConcurrentHashMap<>();
 898 
 899     /**
 900      * This is the boolean singleton, used for all boolean types
 901      */
 902     public static final Type BOOLEAN = putInCache(new BooleanType());
 903 
 904     /**
 905      * This is an integer type, i.e INT, INT32.
 906      */
 907     public static final BitwiseType INT = putInCache(new IntType());
 908 
 909     /**
 910      * This is the number singleton, used for all number types
 911      */
 912     public static final NumericType NUMBER = putInCache(new NumberType());
 913 
 914     /**
 915      * This is the long singleton, used for all long types
 916      */
 917     public static final Type LONG = putInCache(new LongType());
 918 
 919     /**
 920      * A string singleton
 921      */
 922     public static final Type STRING = putInCache(new ObjectType(String.class));
 923 
 924     /**
 925      * This is the CharSequence singleton used to represent JS strings internally
 926      * (either a {@code java.lang.String} or {@code jdk.nashorn.internal.runtime.ConsString}.
 927      */
 928     public static final Type CHARSEQUENCE = putInCache(new ObjectType(CharSequence.class));
 929 
 930 
 931     /**
 932      * This is the object singleton, used for all object types
 933      */
 934     public static final Type OBJECT = putInCache(new ObjectType());
 935 
 936     /**
 937      * A undefined singleton


< prev index next >