• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

1 library(jpl): A Java interface for SWI Prolog 7.x
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • JPL: A bidirectional Prolog/Java interface
        • library(jpl): A Java interface for SWI Prolog 7.x
          • jpl_new/3
          • jpl_call/4
          • jpl_get/3
          • jpl_set/3
          • jpl_get_default_jvm_opts/1
          • jpl_set_default_jvm_opts/1
          • jpl_get_actual_jvm_opts/1
          • jpl_pl_lib_version/1
          • jpl_c_lib_version/1
          • jpl_class_to_classname/2
          • jpl_class_to_type/2
          • jpl_classname_to_class/2
          • jpl_entityname_to_type/2
          • jpl_type_to_entityname/2
          • jpl_classname_to_type/2
          • jpl_type_to_classname/2
          • jpl_datum_to_type/2
          • jpl_object_to_class/2
          • jpl_object_to_type/2
          • jpl_primitive_type/1
          • jpl_ref_to_type/2
          • jpl_type_to_class/2
          • jpl_is_class/1
          • jpl_is_false/1
          • jpl_is_null/1
          • jpl_is_object/1
          • jpl_is_object_type/1
          • jpl_is_ref/1
          • jpl_is_true/1
          • jpl_is_type/1
          • jpl_is_void/1
          • jpl_false/1
          • jpl_null/1
          • jpl_true/1
          • jpl_void/1
          • jpl_array_to_length/2
          • jpl_array_to_list/2
          • jpl_datums_to_array/2
          • jpl_enumeration_element/2
          • jpl_enumeration_to_list/2
          • jpl_hashtable_pair/2
          • jpl_iterator_element/2
          • jpl_list_to_array/2
          • jpl_terms_to_array/2
          • jpl_array_to_terms/2
          • jpl_map_element/2
          • jpl_set_element/2
          • jpl_servlet_byref/3
          • jpl_servlet_byval/3
          • jpl_pl_syntax/1
Availability::- use_module(library(jpl)).(can be autoloaded)
Sourcejpl_entityname_to_type(+EntityName:atom, -Type:jpl_type)
EntityName is the entity name (an atom) denoting a Java type, to be mapped to a JPL type. This is the string returned by java.lang.Class.getName().

Type is the JPL type (a ground term) denoting the same Java type as EntityName does.

The Java type in question may be a reference type (class, abstract class, interface), and array type or a primitive, including "void".

Examples:

int                       int
integer                   class([],[integer])
void                      void
char                      char
double                    double
[D                        array(double)
[[I                       array(array(int))
java.lang.String          class([java,lang],['String'])
[Ljava.lang.String;       array(class([java,lang],['String']))
[[Ljava.lang.String;      array(array(class([java, lang], ['String'])))
[[[Ljava.util.Calendar;   array(array(array(class([java,util],['Calendar']))))
foo.bar.Bling$Blong       class([foo,bar],['Bling','Blong'])

NB uses caches where the class has already been mapped once before.

See also
https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/lang/Class.html#getName()
ClioPatria (version V3.1.1-42-gd6a756b-DIRTY)