org.jacorb.ir

Class RepositoryImpl

public class RepositoryImpl extends IRObject implements RepositoryOperations, Configurable

The Interface Repository.

This class represents the repository itself as well as the executable server.

Methods from the "write" interface to the IR are not supported.

Version: $Id: RepositoryImpl.java,v 1.12 2006/06/15 16:43:14 alphonse.bendt Exp $

Author: Gerald Brose

Constructor Summary
RepositoryImpl(String classpath, String outfile, URLClassLoader loader)
constructor to launch a repository with the contents of classpath
Method Summary
voidconfigure(Configuration myConfiguration)
Contained[]contents(DefinitionKind limit_type, boolean exclude_inherited)
list the contents of the repository
AliasDefcreate_alias(String id, String name, String version, IDLType original_type)
ArrayDefcreate_array(int length, IDLType element_type)
not supported
ConstantDefcreate_constant(String id, String name, String version, IDLType type, Any value)
EnumDefcreate_enum(String id, String name, String version, String[] members)
ExceptionDefcreate_exception(String id, String name, String version, StructMember[] member)
FixedDefcreate_fixed(short digits, short scale)
not supported
InterfaceDefcreate_interface(String id, String name, String version, InterfaceDef[] base_interfaces, boolean is_abstract)
not supported
ModuleDefcreate_module(String id, String name, String version)
NativeDefcreate_native(String id, String name, String version)
not supported
SequenceDefcreate_sequence(int bound, IDLType element_type)
not supported
StringDefcreate_string(int bound)
not supported
StructDefcreate_struct(String id, String name, String version, StructMember[] members)
UnionDefcreate_union(String id, String name, String version, IDLType discriminator_type, UnionMember[] members)
ValueDefcreate_value(String id, String name, String version, boolean is_custom, boolean is_abstract, ValueDef base_value, boolean is_truncatable, ValueDef[] abstract_base_values, InterfaceDef[] supported_interfaces, Initializer[] initializers)
not supported
ValueBoxDefcreate_value_box(String id, String name, String version, IDLType type)
not supported
WstringDefcreate_wstring(int bound)
not supported
Description[]describe_contents(DefinitionKind limit_type, boolean exclude_inherited, int max_returned_objs)
describe the contents of the repository
voiddestroy()
TypeCodeget_canonical_typecode(TypeCode tc)
PrimitiveDefget_primitive(PrimitiveKind kind)
voidloadContents()
Containedlookup(String name)
lookup a scoped name in the repository
Containedlookup_id(String search_id)
lookup a repository ID
Contained[]lookup_name(String search_name, int levels_to_search, DefinitionKind limit_type, boolean exclude_inherited)
lookup a simple name in the repository (neither scoped nor ID formatted)

Constructor Detail

RepositoryImpl

public RepositoryImpl(String classpath, String outfile, URLClassLoader loader)
constructor to launch a repository with the contents of classpath

Parameters: classpath a classpath string made up of directories separated by ":"

Method Detail

configure

public void configure(Configuration myConfiguration)

contents

public Contained[] contents(DefinitionKind limit_type, boolean exclude_inherited)
list the contents of the repository

Parameters: limit_type limit the description to objects of this type exclude_inherited exclude inherited items from the description

Returns: an array of items contained in this repository

create_alias

public AliasDef create_alias(String id, String name, String version, IDLType original_type)

create_array

public ArrayDef create_array(int length, IDLType element_type)
not supported

create_constant

public ConstantDef create_constant(String id, String name, String version, IDLType type, Any value)

create_enum

public EnumDef create_enum(String id, String name, String version, String[] members)

create_exception

public ExceptionDef create_exception(String id, String name, String version, StructMember[] member)

create_fixed

public FixedDef create_fixed(short digits, short scale)
not supported

create_interface

public InterfaceDef create_interface(String id, String name, String version, InterfaceDef[] base_interfaces, boolean is_abstract)
not supported

create_module

public ModuleDef create_module(String id, String name, String version)

create_native

public NativeDef create_native(String id, String name, String version)
not supported

create_sequence

public SequenceDef create_sequence(int bound, IDLType element_type)
not supported

create_string

public StringDef create_string(int bound)
not supported

create_struct

public StructDef create_struct(String id, String name, String version, StructMember[] members)

create_union

public UnionDef create_union(String id, String name, String version, IDLType discriminator_type, UnionMember[] members)

create_value

public ValueDef create_value(String id, String name, String version, boolean is_custom, boolean is_abstract, ValueDef base_value, boolean is_truncatable, ValueDef[] abstract_base_values, InterfaceDef[] supported_interfaces, Initializer[] initializers)
not supported

create_value_box

public ValueBoxDef create_value_box(String id, String name, String version, IDLType type)
not supported

create_wstring

public WstringDef create_wstring(int bound)
not supported

describe_contents

public Description[] describe_contents(DefinitionKind limit_type, boolean exclude_inherited, int max_returned_objs)
describe the contents of the repository

Parameters: limit_type limit the description to objects of this type exclude_inherited exclude inherited items from the description max_returned_objs return only so many items

Returns: an array of descriptions

destroy

public void destroy()

get_canonical_typecode

public TypeCode get_canonical_typecode(TypeCode tc)

get_primitive

public PrimitiveDef get_primitive(PrimitiveKind kind)

loadContents

public void loadContents()

lookup

public Contained lookup(String name)
lookup a scoped name in the repository

Parameters: name the name to look for

Returns: a reference to the item with the specified name or null, if not found

lookup_id

public Contained lookup_id(String search_id)
lookup a repository ID

Parameters: search_id a string in Repository ID format, e.g. "IDL:myModule/MyInterface:1.0"

Returns: a reference to the object or null, if not found

lookup_name

public Contained[] lookup_name(String search_name, int levels_to_search, DefinitionKind limit_type, boolean exclude_inherited)
lookup a simple name in the repository (neither scoped nor ID formatted)

Parameters: search_name the name to look for levels_to_search if 1, search only this object, if -1, search all containers contained in this repository, else search until the specified depth is reached limit_type limit the description to objects of this type exclude_inherited exclude inherited items from the description

Returns: an array of items with the specified name