Java 8 Attributes - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Attributes class.

This code example shows how to use the following methods: getLength, getLocalName, getQName, getURI
            @Override public void startElement(String uri, String localName,
                    String qName, Attributes attributes) {
                assertEquals("", uri);
                assertEquals("", localName);
                assertEquals("a:foo", qName);
                assertEquals(1, attributes.getLength());
                assertEquals("", attributes.getURI(0));
                assertOneOf("a:bar", "", attributes.getLocalName(0));
                assertEquals("a:bar", attributes.getQName(0));
            } 
        }); 
    } 
 
    /** 
     * Test that the external-general-entities feature can be disabled. 
     * http://code.google.com/p/android/issues/detail?id=9493 
     */ 
    public void testDisableExternalGeneralEntities() throws Exception { 
        String xml = "<!DOCTYPE foo ["
                + "  <!ENTITY bar SYSTEM \"/no-such-document.xml\">" 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValue
                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
         
        final String id = attrs.getValue( "id" );
        final String name = attrs.getValue( "name" );
        final String version = attrs.getValue( "version" );
        final String type = attrs.getValue( "type" );
        final String packageName = attrs.getValue( "package-name" );
        final String routerLayout = attrs.getValue( "routerLayout" );
         
        RuleFlowProcess process = new RuleFlowProcess();
        process.setId( id );
        process.setName( name );
        process.setVersion( version );
        process.setType( type );
        process.setPackageName( packageName );
        if (routerLayout != null) {
            process.setMetaData("routerLayout", new Integer(routerLayout));
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValue
    return ex;
  } 
 
  /** Create RemoteException from attributes */ 
  public static RemoteException valueOf(Attributes attrs) {
    return new RemoteException(attrs.getValue("class"),
        attrs.getValue("message")); 
  } 
 
  @Override 
  public String toString() {
    return getClass().getName() + "(" + className + "): " + getMessage();
  } 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValue
     *  
     * @param attrs the attributes from which version properties will be drawn 
     */ 
 
    VeecheckVersion(Attributes attrs) {
        packageName = emptyToNull(attrs.getValue("packageName"));
        versionCode = emptyToNull(attrs.getValue("versionCode"));
        versionName = emptyToNull(attrs.getValue("versionName"));
        buildBrand = emptyToNull(attrs.getValue("buildBrand"));
        buildId = emptyToNull(attrs.getValue("buildId"));
        buildModel = emptyToNull(attrs.getValue("buildModel"));
    } 
 
 
    /** 
     * Replaces tokens of the form <tt>${name}</tt> with version properties in a supplied URL. 
     *  
     * @param url the URL into which properties should be substituted 
     * @return the resulting URL, unchanged if no tokens were present 
     */ 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValue
	} 
 
	public Object start(final String uri, final String localName,
			final Attributes attrs, final ExtensibleXmlParser parser)
			throws SAXException {
		parser.startElementBuilder(localName, attrs);
		WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent();
 
		final String name = attrs.getValue("name");
		final String type = attrs.getValue("importType");
		final String location = attrs.getValue("location");
		final String namespace = attrs.getValue("namespace");
		emptyAttributeCheck(localName, "name", name, parser);
 
		if (type != null && location != null && namespace != null) {
    		Map<String, String> typedImports = (Map<String, String>) process.getMetaData(type);
    		if (typedImports == null) {
    		    typedImports = new HashMap<String, String>();
    		    process.setMetaData(type, typedImports);
    		} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 Attributes Questions & Answers:

See Code Examples for Java 8 Attributes Methods: