Java Code Examples for com.sun.xml.internal.xsom.XSParticle#getLocator()
The following examples show how to use
com.sun.xml.internal.xsom.XSParticle#getLocator() .
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: DefaultParticleBinder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 2
Source File: DefaultParticleBinder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 3
Source File: DefaultParticleBinder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 4
Source File: DefaultParticleBinder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 5
Source File: DefaultParticleBinder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 6
Source File: DefaultParticleBinder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 7
Source File: DefaultParticleBinder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 8
Source File: DefaultParticleBinder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 9
Source File: DefaultParticleBinder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 10
Source File: DefaultParticleBinder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 11
Source File: DefaultParticleBinder.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 12
Source File: DefaultParticleBinder.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 13
Source File: DefaultParticleBinder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 14
Source File: DefaultParticleBinder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }
Example 15
Source File: DefaultParticleBinder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override public void build( XSParticle p, Collection<XSParticle> forcedProps ) { Checker checker = checkCollision(p,forcedProps); if(checker.hasNameCollision()) { CReferencePropertyInfo prop = new CReferencePropertyInfo( getCurrentBean().getBaseClass()==null?"Content":"Rest", true, false, false, p, builder.getBindInfo(p).toCustomizationList(), p.getLocator(), false, false, false); RawTypeSetBuilder.build(p,false).addTo(prop); prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC, checker.getCollisionInfo().toString() ); getCurrentBean().addProperty(prop); } else { new Builder(checker.markedParticles).particle(p); } }
Example 16
Source File: DefaultParticleBinder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Checks the label conflict of a particle. * This method shall be called for each marked particle. * * @return * a description of a collision if a name collision is * found. Otherwise null. */ CollisionInfo check( XSParticle p ) { // this can be used for particles with a property customization, // which may not have element declaration as its term. // // we only check particles with element declarations. // _assert( p.getTerm().isElementDecl() ); String label = computeLabel(p); if( occupiedLabels.containsKey(label) ) { // collide with occupied labels return new CollisionInfo(label,p.getLocator(), occupiedLabels.get(label).locator); } for( XSParticle jp : particles ) { if(!check( p, jp )) { // problem was found. no need to check further return new CollisionInfo( label, p.getLocator(), jp.getLocator() ); } } particles.add(p); return null; }