Java Code Examples for jdk.internal.dynalink.CallSiteDescriptor#OPERATOR_DELIMITER

The following examples show how to use jdk.internal.dynalink.CallSiteDescriptor#OPERATOR_DELIMITER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(final CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 2
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(final CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 3
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(final CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 4
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(final CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 5
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(final CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 6
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 7
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 8
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(final CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}
 
Example 9
/**
 * Tokenizes a composite operation name along pipe characters. I.e. if you have a "dyn:getElem|getProp|getMethod"
 * operation, returns a list of ["getElem", "getProp", "getMethod"]. The tokens are not interned.
 * @param desc the call site descriptor with the operation
 * @return a list of tokens
 */
public static List<String> tokenizeOperators(CallSiteDescriptor desc) {
    final String ops = desc.getNameToken(CallSiteDescriptor.OPERATOR);
    final StringTokenizer tok = new StringTokenizer(ops, CallSiteDescriptor.OPERATOR_DELIMITER);
    final int count = tok.countTokens();
    if(count == 1) {
        return Collections.singletonList(ops);
    }
    final String[] tokens = new String[count];
    for(int i = 0; i < count; ++i) {
        tokens[i] = tok.nextToken();
    }
    return Arrays.asList(tokens);
}