code
stringlengths
73
34.1k
label
stringclasses
1 value
public static List<ConfigObjectRecord> readRecordFromLDAP( final ChaiEntry ldapEntry, final String attr, final String recordType, final Set guid1, final Set guid2 ) throws ChaiOperationException, ChaiUnavailableException { if ( ldap...
java
public static ChaiGroup createGroup( final String parentDN, final String name, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { //Get a good CN for it final String objectCN = findUniqueName( name, parentDN, provider ); //Concantonate the en...
java
public static String findUniqueName( final String baseName, final String containerDN, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { char ch; final StringBuilder cnStripped = new StringBuilder(); final String effectiveBasename = ( baseNam...
java
public static String entryToLDIF( final ChaiEntry theEntry ) throws ChaiUnavailableException, ChaiOperationException { final StringBuilder sb = new StringBuilder(); sb.append( "dn: " ).append( theEntry.getEntryDN() ).append( "\n" ); final Map<String, Map<String, List<String>>> r...
java
public static DirectoryVendor determineDirectoryVendor( final ChaiEntry rootDSE ) throws ChaiUnavailableException, ChaiOperationException { final Set<String> interestedAttributes = new HashSet<>(); for ( final DirectoryVendor directoryVendor : DirectoryVendor.values() ) { ...
java
static boolean isAuthenticationRelated ( final String message ) { for ( final DirectoryVendor vendor : DirectoryVendor.values() ) { final ErrorMap errorMap = vendor.getVendorFactory().getErrorMap(); if ( errorMap.isAuthenticationRelated( message ) ) { ...
java
public void setFilterNot( final String attributeName, final String value ) { this.setFilter( attributeName, value ); filter = "(!" + filter + ")"; }
java
public void setFilter( final String attributeName, final String value ) { filter = new FilterSequence( attributeName, value ).toString(); }
java
public void setFilterOr( final Map<String, String> nameValuePairs ) { if ( nameValuePairs == null ) { throw new NullPointerException(); } if ( nameValuePairs.size() < 1 ) { throw new IllegalArgumentException( "requires at least one key" ); } ...
java
public static boolean convertStrToBoolean( final String string ) { return !( string == null || string.length() < 1 ) && ( "true".equalsIgnoreCase( string ) || "1".equalsIgnoreCase( string ) || "yes".equalsIgnoreCase( string ) || "y".equalsIgnoreCase( string ) ...
java
public byte[] getEncodedValue() { final String characterEncoding = this.chaiConfiguration.getSetting( ChaiSetting.LDAP_CHARACTER_ENCODING ); final byte[] password = modifyPassword.getBytes( Charset.forName( characterEncoding ) ); final byte[] dn = modifyDn.getBytes( Charset.forName( characte...
java
public static void registerTypeConversion(Conversion<?> conversion) { Object[] keys=conversion.getTypeKeys(); if (keys==null) { return; } for (int i=0; i<keys.length; i++) { registerTypeConversion(keys[i],conversion); } }
java
private static List<Object> getTypeKeys(Conversion<?> conversion) { List<Object> result=new ArrayList<Object>(); synchronized (typeConversions) { // Clone the conversions Map<Object,Conversion<?>> map= new HashMap<Object,Conversion<?>>(typeConversions); // Find all keys that map to this conversion i...
java
private static Conversion<?> getTypeConversion( Object typeKey, Object value) { // Check if the provided value is already of the target type if (typeKey instanceof Class && ((Class)typeKey)!=Object.class && ((Class)typeKey).isInstance(value)) { return IDENTITY_CONVERSION; } // Find the type conversi...
java
@Override public boolean getScrollableTracksViewportWidth() { Component parent = getParent(); ComponentUI myui = getUI(); return parent == null || (myui.getPreferredSize(this).width <= parent.getSize().width); }
java
public int yToLine(int y) { FontMetrics fm = this.getFontMetrics(this.getFont()); int height = fm.getHeight(); Document doc = this.getDocument(); int length = doc.getLength(); Element map = doc.getDefaultRootElement(); int startLine = map.getElementIndex(0); int e...
java
public Campaign readFile(String fileName) throws Exception { Campaign result = new Campaign(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(fileName); doc.getDocumentElement().normalize(...
java
public boolean execute(Campaign campaign) { boolean campaignResult = true; currentCampaign = campaign; campaignStartTimeStamp = new Date(); try { createReport(); for (CampaignRun run : currentCampaign.getRuns()) { if (TestEngine.isAbortedByUser())...
java
private void createReport() { CampaignReportManager.getInstance().startReport(campaignStartTimeStamp, currentCampaign.getName()); for (CampaignRun run : currentCampaign.getRuns()) { CampaignResult result = new CampaignResult(run.getTestbed()); result.setStatus(Status.NOT_EXECUTED...
java
public void open() throws SQLException, ClassNotFoundException { logger.info("Using database driver: " + jdbcDriver); Class.forName(jdbcDriver); logger.info("Using database.url: " + jdbcURL); // connect login/pass con = DriverManager.getConnection(jdbcURL, user, password); ...
java
public ResultSet executeQuery(String query) throws SQLException, ClassNotFoundException { if (!connected) { open(); } Statement stmt = con.createStatement(); return stmt.executeQuery(query); }
java
public boolean executeCommand(String query) throws SQLException, ClassNotFoundException { if (!connected) { open(); } Statement stmt = con.createStatement(); return stmt.execute(query); }
java
public void doubleClick(String fileName) throws QTasteException { try { new Region(this.rect).doubleClick(fileName); } catch(Exception ex) { throw new QTasteException(ex.getMessage(), ex); } }
java
public static Type getType() { String osName = System.getProperty("os.name").toLowerCase(); if (osName.contains("windows")) { return Type.WINDOWS; } else if (osName.contains("linux")) { return Type.LINUX; } else if (osName.contains("mac")) { return Ty...
java
public static void copyFiles(File src, File dest) throws IOException { if (src.isDirectory()) { dest.mkdirs(); String list[] = src.list(); for (String fileName : list) { String dest1 = dest.getPath() + "/" + fileName; String src1 = src.getPath(...
java
public static int collapseJTreeNode(javax.swing.JTree tree, javax.swing.tree.TreeModel model, Object node, int row, int depth) { if (node != null && !model.isLeaf(node)) { tree.collapseRow(row); if (depth != 0) { for (int index = 0; row + 1 < tree.getRowCount() ...
java
public static String getDocumentAsXmlString(Document doc) throws TransformerConfigurationException, TransformerException { DOMSource domSource = new DOMSource(doc); TransformerFactory tf = TransformerFactory.newInstance(); try { tf.setAttribute("indent-number", 4); } catch (I...
java
public boolean connect() { if (client.isConnected()) { logger.warn("Already connected"); return true; } try { logger.info("Connecting to remote host " + remoteHost); client.connect(remoteHost); client.rlogin(localUser, remoteUser, termi...
java
public boolean reboot() { if (!sendCommand("reboot")) { return false; } // wait 1 second try { Thread.sleep(1000); } catch (InterruptedException ex) { } disconnect(); // check that remote host is not accessible anymore //...
java
public boolean sendCommand(String command) { if (writer != null) { try { logger.info("Sending command " + command + " to remote host " + remoteHost); writer.write(command); writer.write('\r'); writer.flush(); } catch (IOExce...
java
public void disconnect() { try { if (client.isConnected()) { client.disconnect(); } if (standardInputReaderThread != null) { standardInputReaderThread = null; } if (outputReaderThread != null) { outputRea...
java
protected void paintDisabledText(JLabel pLabel, Graphics pG, String pStr, int pTextX, int pTextY) { Graphics2D g2 = (Graphics2D) pG; pG.setColor(Color.GRAY); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); pG.drawString(pStr, pTextX, pTextY); ...
java
public void close() { if (mWithBody) { mOut.println("</BODY>"); } mOut.println("</HTML>"); mOut.close(); mOut = null; }
java
public void printMethodsSummary(ClassDoc classDoc) { MethodDoc[] methodDocs = TestAPIDoclet.getTestAPIComponentMethods(classDoc); if (methodDocs.length > 0) { mOut.println("<P>"); mOut.println("<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">")...
java
private String getTypeString(Type type) { String typeQualifiedName = type.qualifiedTypeName().replaceFirst("^java\\.lang\\.", ""); typeQualifiedName = typeQualifiedName.replaceFirst("^com\\.qspin\\.qtaste\\.testsuite\\.(QTaste\\w*Exception)", "$1"); String typeDocFileName = null; if (typ...
java
private void printInlineTags(Tag[] tags, ClassDoc classDoc) { for (Tag tag : tags) { if ((tag instanceof SeeTag) && tag.name().equals("@link")) { SeeTag seeTag = (SeeTag) tag; boolean sameClass = seeTag.referencedClass() == classDoc; String fullClassNa...
java
private void updateSize() { int newLineCount = ActionUtils.getLineCount(pane); if (newLineCount == lineCount) { return; } lineCount = newLineCount; int h = (int) pane.getPreferredSize().getHeight(); int d = (int) Math.log10(lineCount) + 1; if (d < 1) {...
java
public JScrollPane getScrollPane(JTextComponent editorPane) { Container p = editorPane.getParent(); while (p != null) { if (p instanceof JScrollPane) { return (JScrollPane) p; } p = p.getParent(); } return null; }
java
public static void copy(File source, File dest) throws IOException { if (dest.isDirectory()) { dest = new File(dest + File.separator + source.getName()); } FileChannel in = null, out = null; try { in = new FileInputStream(source).getChannel(); out = n...
java
public static String readFileContent(String filename) throws FileNotFoundException, IOException { BufferedReader reader = new BufferedReader(new FileReader(filename)); StringBuilder content = new StringBuilder(); String line; final String eol = System.getProperty("line.separator"); ...
java
public static String[] listResourceFiles(Class<?> clazz, String resourceDirName) throws URISyntaxException, IOException { if (!resourceDirName.endsWith("/")) { resourceDirName = resourceDirName + "/"; } URL dirURL = clazz.getResource(resourceDirName); if (dirURL == null) { ...
java
public boolean accept(File f) { if (f != null) { if (f.isDirectory()) { return false; } String extension = getExtension(f); if (extension != null && filters.get(getExtension(f)) != null) { return true; } } ...
java
public String getExtension(File f) { if (f != null) { String filename = f.getName(); int i = filename.lastIndexOf('.'); if (i > 0 && i < filename.length() - 1) { return filename.substring(i + 1).toLowerCase(); } } return null; }
java
@Override public List<Object> getProperty(String key) { List<?> nodes = fetchNodeList(key); if (nodes.size() == 0) { return null; } else { List<Object> list = new ArrayList<>(); for (Object node : nodes) { ConfigurationNode configurationNo...
java
public void loadAddOns() { List<String> addonToLoad = getAddOnClasses(); for (File f : new File(StaticConfiguration.PLUGINS_HOME).listFiles()) { if (f.isFile() && f.getName().toUpperCase().endsWith(".JAR")) { AddOnMetadata meta = AddOnMetadata.createAddOnMetadata(f); ...
java
boolean registerAddOn(AddOn pAddOn) { if (!mRegisteredAddOns.containsKey(pAddOn.getAddOnId())) { mRegisteredAddOns.put(pAddOn.getAddOnId(), pAddOn); if (pAddOn.hasConfiguration()) { addConfiguration(pAddOn.getAddOnId(), pAddOn.getConfigurationPane()); } ...
java
public AddOn getAddOn(String pAddOnId) { if (mRegisteredAddOns.containsKey(pAddOnId)) { return mRegisteredAddOns.get(pAddOnId); } else { LOGGER.warn("Add-on " + pAddOnId + " is not loaded."); return null; } }
java
@Override public Boolean executeCommand(int timeout, String componentName, Object... data) throws QTasteException { setData(data); long maxTime = System.currentTimeMillis() + 1000 * timeout; while (System.currentTimeMillis() < maxTime) { Stage targetPopup = null; for...
java
public static String tabsToSpaces(String in, int tabSize) { StringBuilder buf = new StringBuilder(); int width = 0; for (int i = 0; i < in.length(); i++) { switch (in.charAt(i)) { case '\t': int count = tabSize - (width % tabSize); ...
java
public static String toTitleCase(String str) { if (str.length() == 0) { return str; } else { return Character.toUpperCase(str.charAt(0)) + str.substring(1).toLowerCase(); } }
java
protected String getManifestAttributeValue(Attributes.Name attributeName) { try { String value = attributes.getValue(attributeName); return value != null ? value : "undefined"; } catch (NullPointerException e) { return "undefined"; } catch (IllegalArgumentExce...
java
private static String getQTasteRoot() { String qtasteRoot = System.getenv("QTASTE_ROOT"); if (qtasteRoot == null) { System.err.println("QTASTE_ROOT environment variable is not defined"); System.exit(1); } try { qtasteRoot = new File(qtasteRoot).getCano...
java
protected static List<Stage> findPopups() throws QTasteTestFailException { //find all popups List<Stage> popupFound = new ArrayList<>(); for (Stage stage : getStages()) { Parent root = stage.getScene().getRoot(); if (isAPopup(stage)) { //it's maybe a popup...
java
protected boolean activateAndFocusWindow(Stage window) { if (!window.isFocused()) { if (!window.isShowing()) { LOGGER.trace("cannot activate and focus the window '" + window.getTitle() + "' cause its window is not showing"); return false; } LOG...
java
protected static List<JDialog> findPopups() { //find all popups List<JDialog> popupFound = new ArrayList<>(); for (Window window : getDisplayableWindows()) { // LOGGER.debug("parse window - type : " + window.getClass()); if (isAPopup(window)) { //it's ma...
java
public static String execute(String fileName, String... arguments) throws PyException { return execute(fileName, true, arguments); }
java
public static String execute(String fileName, boolean redirectOutput, String... arguments) throws PyException { Properties properties = new Properties(); properties.setProperty("python.home", StaticConfiguration.JYTHON_HOME); properties.setProperty("python.path", StaticConfiguration.FORMATTER_DI...
java
public static byte[] toNullTerminatedFixedSizeByteArray(String s, int length) { if (s.length() >= length) { s = s.substring(0, length - 1); } while (s.length() < length) { s += '\0'; } return s.getBytes(); }
java
public static String fromNullTerminatedByteArray(byte[] array) { int stringSize = array.length; for (int i = 0; i < array.length; i++) { if (array[i] == 0) { stringSize = i; break; } } return new String(array, 0, stringSize); }
java
public synchronized void register() throws Exception { if (mbeanName != null) { throw new Exception("Agent already registered"); } mbeanName = new ObjectName(getClass().getPackage().getName() + ":type=" + getClass().getSimpleName()); logger.info("Registering JMX agent " + mbe...
java
public synchronized void unregister() throws Exception { if (mbeanName == null) { throw new Exception("Agent not registered"); } logger.info("Unregistering JMX agent " + mbeanName); ManagementFactory.getPlatformMBeanServer().unregisterMBean(mbeanName); logger.info("JM...
java
public synchronized void sendNotification(PropertyChangeEvent pEvt) { String oldValue = pEvt.getOldValue() == null ? "null" : pEvt.getOldValue().toString(); String newValue = pEvt.getNewValue() == null ? "null" : pEvt.getNewValue().toString(); String sourceName = pEvt.getSource().getClass().getC...
java
public int exec(String cmd, Map<String, String> env) throws IOException, InterruptedException { return exec(cmd, env, System.out, System.err, null); }
java
public int exec(String cmd, Map<String, String> env, OutputStream stdout, OutputStream stderr, ByteArrayOutputStream output, File dir) throws IOException, InterruptedException { //logger.debug("Executing '" + cmd + "'"); if (output == null) { output = new ByteArrayOutputS...
java
public static synchronized void generate() { LOGGER.debug("Generating documentation of test documentation included in pythonlib directories."); try { IS_RUNNING = true; List<File> pythonLibDirectories = findPythonLibDirectories(ROOT_SCRIPT_DIRECTORY); List<File> pyth...
java
private static List<File> findPythonScripts(List<File> pythonLibDirectories) { List<File> scripts = new ArrayList<>(); for (File dir : pythonLibDirectories) { if (dir.exists()) { scripts.addAll(Arrays.asList(dir.listFiles(PYTHON_SCRIPT_FILE_FILTER))); } } ...
java
public void checkPropertyValueOrTransition(String propertyValueOrTransition, double maxTime) throws QTasteDataException, QTasteTestFailException { long beginTime_ms = System.currentTimeMillis(); long maxTime_ms = Math.round(maxTime * 1000); propertyValueOrTransition = propertyValueOrTr...
java
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // rebuild hash hashtable hash = new Hashtable<>(); for (NameValue<N, V> nameValue : order) { putInHash(nameValue.name, nameValue.value); ...
java
public boolean removeNotificationListener(String mbeanName, NotificationListener listener) throws Exception { if (isConnected()) { ObjectName objectName = new ObjectName(mbeanName); mbsc.removeNotificationListener(objectName, listener, null, null); jmxc.removeConnectionNotifi...
java
public static String getIndent(String line) { if (line == null || line.length() == 0) { return ""; } int i = 0; while (i < line.length() && line.charAt(i) == '\t') { i++; } return line.substring(0, i); }
java
public void scheduleTask(PyObject task, double delay) { mTimer.schedule(new PythonCallTimerTask(task), Math.round(delay * 1000)); }
java
private static void logAndThrowException(String message, PyException e) throws Exception { LOGGER.error(message, e); throw new Exception(message + ":\n" + PythonHelper.getMessage(e)); }
java
protected static String getSubstitutedTemplateContent(String templateContent, NamesValuesList<String, String> namesValues) { String templateContentSubst = templateContent; // substitute the name/values for (NameValue<String, String> nameValue : namesValues) { templateContentSubst = ...
java
public synchronized HTMLEditorKit.Parser getParser() { if (parser == null) { try { Class<?> c = Class.forName("javax.swing.text.html.parser.ParserDelegator"); parser = (HTMLEditorKit.Parser) c.newInstance(); } catch (Exception e) { } } ...
java
private void iorAnalysis() throws DevFailed { if (!iorString.startsWith("IOR:")) { throw DevFailedUtils.newDevFailed("CORBA_ERROR", iorString + " not an IOR"); } final ORB orb = ORBManager.getOrb(); final ParsedIOR pior = new ParsedIOR((org.jacorb.orb.ORB) orb, iorString); ...
java
public void analyse_methods() throws DevFailed { // // Analyse the execution method given by the user // this.exe_method = analyse_method_exe(device_class_name,exe_method_name); // // Analyse the state method if one is given by the user // if (state_method_name != null) this.state_method = analyse_method...
java
protected Method find_method(Method[] meth_list,String meth_name) throws DevFailed { int i; Method meth_found = null; for (i = 0;i < meth_list.length;i++) { if (meth_name.equals(meth_list[i].getName())) { for (int j = i + 1;j < meth_list.length;j++) { if (meth_name.equals(meth_list[j].get...
java
protected int get_tango_type(Class type_cl) throws DevFailed { int type = 0; // // For arrays // if (type_cl.isArray() == true) { String type_name = type_cl.getComponentType().getName(); if (type_name.equals("byte")) type = Tango_DEVVAR_CHARARRAY; else if (type_name.equals("short")) type = T...
java
public boolean is_allowed(DeviceImpl dev,Any data_in) { if (state_method == null) return true; else { // // If the Method reference is not null, execute the method with the invoke // method // try { java.lang.Object[] meth_param = new java.lang.Object[1]; meth_param[0] = data_in; java.lang...
java
public static Object extract(final DeviceData deviceDataArgout) throws DevFailed { Object argout = null; switch (deviceDataArgout.getType()) { case TangoConst.Tango_DEV_SHORT: argout = Short.valueOf(deviceDataArgout.extractShort()); break; case TangoConst.Tango_DEV_USHORT: argout = Integer.valueOf(de...
java
public void setLoggingLevel(final String deviceName, final int loggingLevel) { System.out.println("set logging level " + deviceName + "-" + LoggingLevel.getLevelFromInt(loggingLevel)); logger.debug("set logging level to {} on {}", LoggingLevel.getLevelFromInt(loggingLevel), deviceName); if (root...
java
public void setRootLoggingLevel(final int loggingLevel) { rootLoggingLevel = loggingLevel; if (rootLoggerBack != null) { rootLoggerBack.setLevel(LoggingLevel.getLevelFromInt(loggingLevel)); } }
java
public void setLoggingLevel(final int loggingLevel, final Class<?>... deviceClassNames) { if (rootLoggingLevel < loggingLevel) { setRootLoggingLevel(loggingLevel); } System.out.println("set logging to " + LoggingLevel.getLevelFromInt(loggingLevel)); final Logger tangoLogger ...
java
public void addDeviceAppender(final String deviceTargetName, final Class<?> deviceClassName, final String loggingDeviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add device appender {} on {}", deviceTargetName, loggingDeviceName); final DeviceAppende...
java
public void addFileAppender(final String fileName, final String deviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add file appender of {} in {}", deviceName, fileName); final String deviceNameLower = deviceName.toLowerCase(Locale.ENGLISH); final File ...
java
@Override public void exportAll() throws DevFailed { // load tango db cache DatabaseFactory.getDatabase().loadCache(serverName, hostName); // special case for admin device final DeviceClassBuilder clazz = new DeviceClassBuilder(AdminDevice.class, Constants.ADMIN_SERVER_CLASS_NAME); ...
java
@Override public void exportDevices() throws DevFailed { // load server class for (final Entry<String, Class<?>> entry : tangoClasses.entrySet()) { final String tangoClass = entry.getKey(); final Class<?> deviceClass = entry.getValue(); logger.debug("loading class...
java
@Override public void unexportDevices() throws DevFailed { xlogger.entry(); final List<DeviceClassBuilder> clazzToRemove = new ArrayList<DeviceClassBuilder>(); for (final DeviceClassBuilder clazz : deviceClassList) { if (!clazz.getDeviceClass().equals(AdminDevice.class)) { ...
java
public void update() throws DevFailed { xlogger.entry(); final Map<String, String[]> property = PropertiesUtils.getDeviceProperties(deviceName); if (property != null && property.size() != 0) { try { propertyMethod.invoke(businessObject, property); } catch (final IllegalArgumentException e) { throw Dev...
java
private synchronized void add(final String... attributes) throws DevFailed { userAttributesNames = new String[attributes.length]; devices = new DeviceProxy[attributes.length]; int i = 0; for (final String attributeName : attributes) { final String deviceName = TangoUtil.getfu...
java
public static Object getWritePart(final Object array, final AttrWriteType writeType) { if (writeType.equals(AttrWriteType.READ_WRITE)) { return Array.get(array, 1); } else { return Array.get(array, 0); } }
java
@SuppressWarnings("unchecked") public static <T> T castToType(final Class<T> type, final Object val) throws DevFailed { T result; if (val == null) { result = null; } else if (type.isAssignableFrom(val.getClass())) { result = (T) val; } else { LOGGER.debug("converting {} to {}", val.getClass().ge...
java
public static Object extractReadOrWrite(final Part part, final DeviceAttribute da, final Object readWrite) throws DevFailed { // separate read and written values final Object result; final int dimRead; if (da.getDimY() != 0) { dimRead = da.getDimX() * da.getDimY(); } else { dimRead = da.getDimX(); ...
java
public Any execute(DeviceImpl device, Any in_any) throws DevFailed { Util.out4.println("GetLoggingLevelCmd::execute(): arrived"); String[] dvsa = null; try { dvsa = extract_DevVarStringArray(in_any); } catch (DevFailed df) { Util.out3.println("GetLoggingLevelCmd::execute() --> Wrong argument ...
java
public static String getFirstFullTangoHost() throws DevFailed { // TODO final String TANGO_HOST_ERROR = "API_GetTangoHostFailed"; // Get the tango_host String host = getFirstHost(); try { // Get FQDN for host final InetAddress iadd = InetAddress.getByNam...
java
private Vector get_hierarchy() { synchronized (this) { final Vector h = new Vector(); final Iterator it = elements.iterator(); while (it.hasNext()) { final GroupElement e = (GroupElement) it.next(); if (e instanceof GroupDeviceElement) { h.add(e); } else { h.add(((Group) e).get_hierarc...
java
private int get_size_i(final boolean fwd) { int size = 0; final Iterator it = elements.iterator(); while (it.hasNext()) { final GroupElement e = (GroupElement) it.next(); if (e instanceof GroupDeviceElement || fwd) { size += e.get_size(true); } } return size; }
java
private boolean add_i(final GroupElement e) { if (e == null || e == this) { // -DEBUG System.out.println("Group::add_i::failed to add " + e.get_name() + " (null or self)"); return false; } final GroupElement ge = find_i(e.get_name(), e instanceof Group ? false : true); if (ge != null && ge != this) {...
java
public Any insert(boolean data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_boolean(data); return out_any; }
java
public Any insert(short data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_short(data); return out_any; }
java