Java Reflection Interface Get getPortNameAndSuffixFromInterfaceName( String intfName)

Here you can find the source of getPortNameAndSuffixFromInterfaceName( String intfName)

Description

get Port Name And Suffix From Interface Name

License

Open Source License

Declaration

public static List<String> getPortNameAndSuffixFromInterfaceName(
            String intfName) 

Method Source Code

//package com.java2s;
/*/*  ww w.  j a  va  2s.  c o m*/
 * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static List<String> getPortNameAndSuffixFromInterfaceName(
            String intfName) {
        List<String> strList = new ArrayList<>(2);
        int index = intfName.indexOf(":");
        if (index != -1) {
            strList.add(0, intfName.substring(0, index));
            strList.add(1, intfName.substring(index));
        }
        return strList;
    }
}

Related

  1. getInterfaces(final Class type)
  2. getInterfaces(Object owner, String[] interfaceStrings)
  3. getInterfacesForClass(Class type)
  4. getInterfacesList(Class clazz)
  5. getParentAllInterfaces(Class pojoClass)