ParticleBinder that follows the JAXB spec.
| Modifier and Type | Class and Description |
|---|---|
| private class | DefaultParticleBinder.
Builds properties by using the result computed by Checker |
| private class | DefaultParticleBinder.
Marks particles that need to be mapped to properties, by reading customization info. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | build(XSParticle p, Collection<XSParticle> forcedProps)
Implements abstract com. The version of the build method that forces a specified set of particles to become a property. |
| private DefaultParticleBinder. | |
| public boolean | checkFallback(XSParticle p)
Implements abstract com. Similar to the build method but this method only checks if the BGM that will be built by the build method will do the fallback (map all the properties into one list) or not. |
| DefaultParticleBinder | back to summary |
|---|---|
| pack-priv DefaultParticleBinder() | |
| build | back to summary |
|---|---|
| public void build(XSParticle p, Collection<XSParticle> forcedProps) Implements abstract com. Doc from com. The version of the build method that forces a specified set of particles to become a property.
| |
| checkCollision | back to summary |
|---|---|
| private DefaultParticleBinder. | |
| checkFallback | back to summary |
|---|---|
| public boolean checkFallback(XSParticle p) Implements abstract com. Doc from com. Similar to the build method but this method only checks if the BGM that will be built by the build method will do the fallback (map all the properties into one list) or not.
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | insideOptionalParticle
When we are visiting inside an optional particle, this flag is set to true. |
| private final Map | markedParticles
All marked particles. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private String | |
| private boolean | |
| public void | |
| public void | |
| public void | |
| public void |
| insideOptionalParticle | back to summary |
|---|---|
| private boolean insideOptionalParticle When we are visiting inside an optional particle, this flag is set to true. This allows us to correctly generate primitive/boxed types. | |
| markedParticles | back to summary |
|---|---|
| private final Map<XSParticle, String> markedParticles All marked particles. | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(Map<XSParticle, String> markedParticles) | |
| elementDecl | back to summary |
|---|---|
| public void elementDecl(XSElementDecl e) Implements com.
| |
| getLabel | back to summary |
|---|---|
| private String getLabel(XSParticle p) Gets a label of a particle. | |
| marked | back to summary |
|---|---|
| private boolean marked(XSParticle p) Returns true if a particle is marked. | |
| modelGroup | back to summary |
|---|---|
| public void modelGroup(XSModelGroup mg) Implements com.
| |
| modelGroupDecl | back to summary |
|---|---|
| public void modelGroupDecl(XSModelGroupDecl decl) Implements com.
| |
| particle | back to summary |
|---|---|
| public void particle(XSParticle p) | |
| wildcard | back to summary |
|---|---|
| public void wildcard(XSWildcard wc) Implements com.
| |
| Modifier and Type | Class and Description |
|---|---|
| private class | DefaultParticleBinder.
Checks name collisions among particles that belong to sequences. |
| Modifier and Type | Field and Description |
|---|---|
| private final DefaultParticleBinder. | cchecker
Used to check name collision. |
| private CollisionInfo | collisionInfo
If a collision is found, this field will be non-null. |
| private final Collection | |
| private final Map | labelCache
Keep the computed label names for particles. |
| public final Map | markedParticles
Marked particles. |
| private XSParticle | outerParticle
This field points to the parent XSParticle. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private String | |
| public void | |
| pack-priv CollisionInfo | |
| pack-priv boolean | |
| private void | |
| public void | |
| public void | |
| public void | |
| pack-priv void | |
| public void |
| cchecker | back to summary |
|---|---|
| private final DefaultParticleBinder. Used to check name collision. | |
| collisionInfo | back to summary |
|---|---|
| private CollisionInfo collisionInfo If a collision is found, this field will be non-null. | |
| forcedProps | back to summary |
|---|---|
| private final Collection<XSParticle> forcedProps | |
| labelCache | back to summary |
|---|---|
| private final Map<XSParticle, String> labelCache Keep the computed label names for particles. | |
| markedParticles | back to summary |
|---|---|
| public final Map<XSParticle, String> markedParticles Marked particles. A map from XSParticle to its label. | |
| outerParticle | back to summary |
|---|---|
| private XSParticle outerParticle This field points to the parent XSParticle. The value is only valid when we are processing XSTerm. | |
| Checker | back to summary |
|---|---|
| pack-priv Checker(Collection<XSParticle> forcedProps) | |
| check | back to summary |
|---|---|
| private void check(XSParticle p) Checks the name collision of a newly found particle. | |
| computeLabel | back to summary |
|---|---|
| private String computeLabel(XSParticle p) Hides the computeLabel method of the outer class and adds caching. | |
| elementDecl | back to summary |
|---|---|
| public void elementDecl(XSElementDecl decl) Implements com.
| |
| getCollisionInfo | back to summary |
|---|---|
| pack-priv CollisionInfo getCollisionInfo() | |
| hasNameCollision | back to summary |
|---|---|
| pack-priv boolean hasNameCollision() | |
| mark | back to summary |
|---|---|
| private void mark(XSParticle p) Marks a particle that it's going to be mapped to a property. | |
| modelGroup | back to summary |
|---|---|
| public void modelGroup(XSModelGroup mg) Implements com.
| |
| modelGroupDecl | back to summary |
|---|---|
| public void modelGroupDecl(XSModelGroupDecl decl) Implements com.
| |
| particle | back to summary |
|---|---|
| public void particle(XSParticle p) | |
| readSuperClass | back to summary |
|---|---|
| pack-priv void readSuperClass(CClassInfo ci) | |
| wildcard | back to summary |
|---|---|
| public void wildcard(XSWildcard wc) Implements com.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | occupiedLabels
Label names already used in the base type. |
| private final List | particles
List of particles reported through the check method. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv CollisionInfo | Returns: a description of a collision if a name collision is found. Otherwise null.Checks the label conflict of a particle. |
| private boolean | Returns: true if the check was successful.Checks the conflict of two particles. |
| pack-priv void | readSuperClass(CClassInfo base)
Reads fields of the super class and includes them to name collision tests. |
| occupiedLabels | back to summary |
|---|---|
| private final Map<String, CPropertyInfo> occupiedLabels Label names already used in the base type. | |
| particles | back to summary |
|---|---|
| private final List<XSParticle> particles List of particles reported through the check method. | |
| NameCollisionChecker | back to summary |
|---|---|
| private NameCollisionChecker() | |
| check | back to summary |
|---|---|
| pack-priv CollisionInfo check(XSParticle p) Checks the label conflict of a particle. This method shall be called for each marked particle.
| |
| check | back to summary |
|---|---|
| private boolean check(XSParticle p1, XSParticle p2) Checks the conflict of two particles.
| |
| readSuperClass | back to summary |
|---|---|
| pack-priv void readSuperClass(CClassInfo base) Reads fields of the super class and includes them to name collision tests. | |