当前位置: 首页>>代码示例>>Java>>正文


Java XSAnnotationImpl类代码示例

本文整理汇总了Java中com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl的典型用法代码示例。如果您正苦于以下问题:Java XSAnnotationImpl类的具体用法?Java XSAnnotationImpl怎么用?Java XSAnnotationImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XSAnnotationImpl类属于com.sun.org.apache.xerces.internal.impl.xs包,在下文中一共展示了XSAnnotationImpl类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: contentRestore

import com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl; //导入依赖的package包/类
private void contentRestore() {
    fAnnotations = (XSAnnotationImpl [])fGlobalStore[--fGlobalStorePos];
    fXSSimpleType = (XSSimpleType)fGlobalStore[--fGlobalStorePos];
    fParticle = (XSParticleDecl)fGlobalStore[--fGlobalStorePos];
    fAttrGrp = (XSAttributeGroupDecl)fGlobalStore[--fGlobalStorePos];
    fBaseType = (XSTypeDefinition)fGlobalStore[--fGlobalStorePos];
    int i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
    fBlock = (short)(i >> 16);
    fContentType = (short)i;
    i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
    fDerivedBy = (short)(i >> 16);
    fFinal = (short)i;
    fTargetNamespace = (String)fGlobalStore[--fGlobalStorePos];
    fName = (String)fGlobalStore[--fGlobalStorePos];
    fIsAbstract = ((Boolean)fGlobalStore[--fGlobalStorePos]).booleanValue();
    fComplexTypeDecl = (XSComplexTypeDecl)fGlobalStore[--fGlobalStorePos];
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:XSDComplexTypeTraverser.java

示例2: addAnnotation

import com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl; //导入依赖的package包/类
private void addAnnotation(XSAnnotationImpl annotation) {
    if(annotation == null)
        return;
    // it isn't very likely that there will be more than one annotation
    // in a complexType decl.  This saves us fromhaving to push/pop
    // one more object from the fGlobalStore, and that's bound
    // to be a savings for most applications
    if(fAnnotations == null) {
        fAnnotations = new XSAnnotationImpl[1];
    } else {
        XSAnnotationImpl [] tempArray = new XSAnnotationImpl[fAnnotations.length + 1];
        System.arraycopy(fAnnotations, 0, tempArray, 0, fAnnotations.length);
        fAnnotations = tempArray;
    }
    fAnnotations[fAnnotations.length-1] = annotation;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:XSDComplexTypeTraverser.java

示例3: contentRestore

import com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl; //导入依赖的package包/类
private void contentRestore() {
    fAnnotations = (XSAnnotationImpl [])fGlobalStore[--fGlobalStorePos];
    fXSSimpleType = (XSSimpleType)fGlobalStore[--fGlobalStorePos];
    fParticle = (XSParticleDecl)fGlobalStore[--fGlobalStorePos];
    fAttrGrp = (XSAttributeGroupDecl)fGlobalStore[--fGlobalStorePos];
    fBaseType = (XSTypeDefinition)fGlobalStore[--fGlobalStorePos];
    int i = ((Integer)(fGlobalStore[--fGlobalStorePos]));
    fBlock = (short)(i >> 16);
    fContentType = (short)i;
    i = ((Integer)(fGlobalStore[--fGlobalStorePos]));
    fDerivedBy = (short)(i >> 16);
    fFinal = (short)i;
    fTargetNamespace = (String)fGlobalStore[--fGlobalStorePos];
    fName = (String)fGlobalStore[--fGlobalStorePos];
    fIsAbstract = ((Boolean)fGlobalStore[--fGlobalStorePos]);
    fComplexTypeDecl = (XSComplexTypeDecl)fGlobalStore[--fGlobalStorePos];
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:XSDComplexTypeTraverser.java

示例4: addAnnotation

import com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl; //导入依赖的package包/类
public void addAnnotation(XSAnnotationImpl annotation) {
    if(annotation == null)
        return;
    if(fAnnotations == null) {
        fAnnotations = new XSAnnotationImpl[2];
    } else if(fNumAnnotations == fAnnotations.length) {
        XSAnnotationImpl[] newArray = new XSAnnotationImpl[fNumAnnotations << 1];
        System.arraycopy(fAnnotations, 0, newArray, 0, fNumAnnotations);
        fAnnotations = newArray;
    }
    fAnnotations[fNumAnnotations++] = annotation;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:IdentityConstraint.java

示例5: traverseSyntheticAnnotation

import com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl; //导入依赖的package包/类
XSAnnotationImpl traverseSyntheticAnnotation(Element annotationParent, String initialContent,
        Object[] parentAttrs, boolean isGlobal, XSDocumentInfo schemaDoc) {

    String contents = initialContent;

    // find the grammar; fSchemaHandler must be known!
    SchemaGrammar grammar = fSchemaHandler.getGrammar(schemaDoc.fTargetNamespace);
    // fish out local attributes passed from parent
    Vector annotationLocalAttrs = (Vector)parentAttrs[XSAttributeChecker.ATTIDX_NONSCHEMA];
    // optimize for case where there are no local attributes
    if (annotationLocalAttrs != null && !annotationLocalAttrs.isEmpty()) {
        StringBuffer localStrBuffer = new StringBuffer(64);
        localStrBuffer.append(" ");
        // Vector should contain rawname value pairs
        int i = 0;
        while (i < annotationLocalAttrs.size()) {
            String rawname = (String)annotationLocalAttrs.elementAt(i++);
            int colonIndex = rawname.indexOf(':');
            String prefix, localpart;
            if (colonIndex == -1) {
                prefix = "";
                localpart = rawname;
            }
            else {
                prefix = rawname.substring(0,colonIndex);
                localpart = rawname.substring(colonIndex+1);
            }
            String uri = schemaDoc.fNamespaceSupport.getURI(fSymbolTable.addSymbol(prefix));
            localStrBuffer.append(rawname)
            .append("=\"");
            String value = (String)annotationLocalAttrs.elementAt(i++);
            // search for pesky "s and <s within attr value:
            value = processAttValue(value);
            localStrBuffer.append(value)
            .append("\" ");
        }
        // and now splice it into place; immediately after the annotation token, for simplicity's sake
        StringBuffer contentBuffer = new StringBuffer(contents.length() + localStrBuffer.length());
        int annotationTokenEnd = contents.indexOf(SchemaSymbols.ELT_ANNOTATION);
        // annotation must occur somewhere or we're in big trouble...
        if(annotationTokenEnd == -1) return null;
        annotationTokenEnd += SchemaSymbols.ELT_ANNOTATION.length();
        contentBuffer.append(contents.substring(0,annotationTokenEnd));
        contentBuffer.append(localStrBuffer.toString());
        contentBuffer.append(contents.substring(annotationTokenEnd, contents.length()));
        final String annotation = contentBuffer.toString();
        if (fValidateAnnotations) {
            schemaDoc.addAnnotation(new XSAnnotationInfo(annotation, annotationParent));
        }
        return new XSAnnotationImpl(annotation, grammar);
    } else {
        if (fValidateAnnotations) {
            schemaDoc.addAnnotation(new XSAnnotationInfo(contents, annotationParent));
        }
        return new XSAnnotationImpl(contents, grammar);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:58,代码来源:XSDAbstractTraverser.java


注:本文中的com.sun.org.apache.xerces.internal.impl.xs.XSAnnotationImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。