com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration Java Examples

The following examples show how to use com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration. 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
Source File: BGMBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #2
Source File: UnusedCustomizationChecker.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #3
Source File: BGMBuilder.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #4
Source File: UnusedCustomizationChecker.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #5
Source File: BGMBuilder.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #6
Source File: UnusedCustomizationChecker.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #7
Source File: BGMBuilder.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #8
Source File: UnusedCustomizationChecker.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #9
Source File: BGMBuilder.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #10
Source File: UnusedCustomizationChecker.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #11
Source File: BGMBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #12
Source File: BGMBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #13
Source File: UnusedCustomizationChecker.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #14
Source File: UnusedCustomizationChecker.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #15
Source File: UnusedCustomizationChecker.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void check(BIDeclaration decl, XSComponent c) {
    if( !decl.isAcknowledged() ) {
        getErrorReporter().error(
            decl.getLocation(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
            decl.getName().getLocalPart()
            );
        getErrorReporter().error(
            c.getLocator(),
            Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
        // mark it as acknowledged to avoid
        // duplicated error messages.
        decl.markAsAcknowledged();
    }
    for (BIDeclaration d : decl.getChildren())
        check(d,c);
}
 
Example #16
Source File: BGMBuilder.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
    ArrayList<Locator> locations = new ArrayList<Locator>();

    BindInfo bi = getBindInfo(schema);
    for( BIDeclaration bid : bi ) {
        if( bid.getName()==BISchemaBinding.NAME )
            locations.add( bid.getLocation() );
    }
    if(locations.size()<=1)    return; // OK

    // error
    getErrorReporter().error( locations.get(0),
        Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
        schema.getTargetNamespace() );
    for( int i=1; i<locations.size(); i++ )
        getErrorReporter().error( (Locator)locations.get(i),
            Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
 
Example #17
Source File: ParticleBinder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #18
Source File: ParticleBinder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #19
Source File: UnusedCustomizationChecker.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}
 
Example #20
Source File: ParticleBinder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #21
Source File: UnusedCustomizationChecker.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}
 
Example #22
Source File: UnusedCustomizationChecker.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}
 
Example #23
Source File: ParticleBinder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #24
Source File: ParticleBinder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #25
Source File: UnusedCustomizationChecker.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}
 
Example #26
Source File: UnusedCustomizationChecker.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}
 
Example #27
Source File: UnusedCustomizationChecker.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}
 
Example #28
Source File: ParticleBinder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #29
Source File: ParticleBinder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
    // check the property customization of this component first
    T cust = builder.getBindInfo(p).get(type);
    if(cust!=null)  return cust;

    // if not, the term might have one.
    cust = builder.getBindInfo(p.getTerm()).get(type);
    if(cust!=null)  return cust;

    return null;
}
 
Example #30
Source File: UnusedCustomizationChecker.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks unused customizations on this component
 * and returns true if this is the first time this
 * component is checked.
 */
private boolean check( XSComponent c ) {
    if( !visitedComponents.add(c) )
        return false;   // already processed

    for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
        check(decl, c);

    checkExpectedContentTypes(c);

    return true;
}