idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
600 | Set < OpensFlag > readOpensFlags ( int flags ) { Set < OpensFlag > set = EnumSet . noneOf ( OpensFlag . class ) ; for ( OpensFlag f : OpensFlag . values ( ) ) { if ( ( flags & f . value ) != 0 ) set . add ( f ) ; } return set ; } | Read opens_flags . |
601 | Set < RequiresFlag > readRequiresFlags ( int flags ) { Set < RequiresFlag > set = EnumSet . noneOf ( RequiresFlag . class ) ; for ( RequiresFlag f : RequiresFlag . values ( ) ) { if ( ( flags & f . value ) != 0 ) set . add ( f ) ; } return set ; } | Read requires_flags . |
602 | Type sigToType ( byte [ ] sig , int offset , int len ) { signature = sig ; sigp = offset ; siglimit = offset + len ; return sigToType ( ) ; } | Convert signature to type where signature is a byte array segment . |
603 | Type sigToType ( ) { switch ( ( char ) signature [ sigp ] ) { case 'T' : sigp ++ ; int start = sigp ; while ( signature [ sigp ] != ';' ) sigp ++ ; sigp ++ ; return sigEnterPhase ? Type . noType : findTypeVar ( names . fromUtf ( signature , start , sigp - 1 - start ) ) ; case '+' : { sigp ++ ; Type t = sigToType ( ) ; ... | Convert signature to type where signature is implicit . |
604 | List < Type > sigToTypeParams ( byte [ ] sig , int offset , int len ) { signature = sig ; sigp = offset ; siglimit = offset + len ; return sigToTypeParams ( ) ; } | Convert signature to type parameters where signature is a byte array segment . |
605 | List < Type > sigToTypeParams ( ) { List < Type > tvars = List . nil ( ) ; if ( signature [ sigp ] == '<' ) { sigp ++ ; int start = sigp ; sigEnterPhase = true ; while ( signature [ sigp ] != '>' ) tvars = tvars . prepend ( sigToTypeParam ( ) ) ; sigEnterPhase = false ; sigp = start ; while ( signature [ sigp ] != '>' ... | Convert signature to type parameters where signature is implicit . |
606 | void skipMember ( ) { bp = bp + 6 ; char ac = nextChar ( ) ; for ( int i = 0 ; i < ac ; i ++ ) { bp = bp + 2 ; int attrLen = nextInt ( ) ; bp = bp + attrLen ; } } | Skip a field or method |
607 | private void readClassBuffer ( ClassSymbol c ) throws IOException { int magic = nextInt ( ) ; if ( magic != JAVA_MAGIC ) throw badClassFile ( "illegal.start.of.class.file" ) ; minorVersion = nextChar ( ) ; majorVersion = nextChar ( ) ; int maxMajor = 53 ; int maxMinor = Version . MAX ( ) . minor ; if ( majorVersion > m... | Read a class definition from the bytes in buf . |
608 | public static JavacMessages instance ( Context context ) { JavacMessages instance = context . get ( messagesKey ) ; if ( instance == null ) instance = new JavacMessages ( context ) ; return instance ; } | Get the JavacMessages instance for this context . |
609 | public String getLocalizedString ( String key , Object ... args ) { return getLocalizedString ( currentLocale , key , args ) ; } | Gets the localized string corresponding to a key formatted with a set of args . |
610 | static String getDefaultLocalizedString ( String key , Object ... args ) { return getLocalizedString ( List . of ( getDefaultBundle ( ) ) , key , args ) ; } | used to support legacy Log . getLocalizedString |
611 | protected void generateClassUseFile ( ) throws DocFileIOException { HtmlTree body = getClassUseHeader ( ) ; HtmlTree div = new HtmlTree ( HtmlTag . DIV ) ; div . addStyle ( HtmlStyle . classUseContainer ) ; if ( pkgSet . size ( ) > 0 ) { addClassUse ( div ) ; } else { div . addContent ( contents . getContent ( "doclet.... | Generate the class use elements . |
612 | protected void addPackageList ( Content contentTree ) { Content caption = getTableCaption ( configuration . getContent ( "doclet.ClassUse_Packages.that.use.0" , getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . CLASS_USE_HEADER , typeElement ) ) ) ) ; Content table = ( configuration . isOutputHtml5 ( )... | Add the packages elements that use the given class . |
613 | protected void addPackageAnnotationList ( Content contentTree ) { if ( ! utils . isAnnotationType ( typeElement ) || pkgToPackageAnnotations == null || pkgToPackageAnnotations . isEmpty ( ) ) { return ; } Content caption = getTableCaption ( configuration . getContent ( "doclet.ClassUse_PackageAnnotation" , getLink ( ne... | Add the package annotation elements . |
614 | private ClassIndex indexForPath ( Path path ) { if ( isJRTMarkerFile ( path ) ) { FileSystem jrtfs = FileSystems . getFileSystem ( URI . create ( "jrt:/" ) ) ; Path modules = jrtfs . getPath ( "modules" ) ; return PATH_TO_INDEX . compute ( path , ( p , index ) -> { try { long lastModified = Files . getLastModifiedTime ... | if an index exists for the given entry the existing index is kept unless the timestamp is modified |
615 | private ClassIndex doIndex ( long timestamp , Path originalPath , Iterable < ? extends Path > dirs ) { Set < String > packages = new HashSet < > ( ) ; Map < String , Collection < String > > classSimpleName2FQN = new HashMap < > ( ) ; for ( Path d : dirs ) { try { Files . walkFileTree ( d , new FileVisitor < Path > ( ) ... | create an index based on the content of the given dirs ; the original JavaFileManager entry is originalPath . |
616 | private static String escapeJavaScriptChars ( String s ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char ch = s . charAt ( i ) ; switch ( ch ) { case '\b' : sb . append ( "\\b" ) ; break ; case '\t' : sb . append ( "\\t" ) ; break ; case '\n' : sb . append ( "\\n" ) ; b... | Returns a String with escaped special JavaScript characters . |
617 | public HtmlTree getBody ( boolean includeScript , String title ) { HtmlTree body = new HtmlTree ( HtmlTag . BODY ) ; this . winTitle = title ; if ( includeScript ) { this . script = getWinTitleScript ( ) ; body . addContent ( script ) ; Content noScript = HtmlTree . NOSCRIPT ( HtmlTree . DIV ( configuration . getConten... | Returns an HtmlTree for the BODY tag . |
618 | public void addStyles ( HtmlStyle style , StringBuilder vars ) { vars . append ( "var " ) . append ( style ) . append ( " = \"" ) . append ( style ) . append ( "\";" ) . append ( DocletConstants . NL ) ; } | Adds javascript style variables to the document . |
619 | private JdepsFilter dependencyFilter ( JdepsConfiguration config ) { JdepsFilter . Builder builder = new JdepsFilter . Builder ( ) ; builder . includePattern ( options . includePattern ) ; builder . filter ( options . filterSamePackage , options . filterSameArchive ) ; builder . findJDKInternals ( options . findJDKInte... | Returns a filter used during dependency analysis |
620 | private static int read ( DocFile inFile , InputStream input , byte [ ] buf ) throws DocFileIOException { try { return input . read ( buf ) ; } catch ( IOException e ) { throw new DocFileIOException ( inFile , DocFileIOException . Mode . READ , e ) ; } } | Reads from an input stream opened from a given file into a given buffer . If an IOException occurs it is wrapped in a DocFileIOException . |
621 | private static void write ( DocFile outFile , OutputStream out , byte [ ] buf , int len ) throws DocFileIOException { try { out . write ( buf , 0 , len ) ; } catch ( IOException e ) { throw new DocFileIOException ( outFile , DocFileIOException . Mode . WRITE , e ) ; } } | Writes to an output stream for a given file from a given buffer . If an IOException occurs it is wrapped in a DocFileIOException . |
622 | private static void write ( DocFile outFile , Writer out , String text ) throws DocFileIOException { try { out . write ( text ) ; } catch ( IOException e ) { throw new DocFileIOException ( outFile , DocFileIOException . Mode . WRITE , e ) ; } } | Writes text to an output stream for a given file from a given buffer . If an IOException occurs it is wrapped in a DocFileIOException . |
623 | private static int readResource ( DocPath resource , InputStream in , byte [ ] buf ) throws ResourceIOException { try { return in . read ( buf ) ; } catch ( IOException e ) { throw new ResourceIOException ( resource , e ) ; } } | Reads from an input stream opened from a given resource into a given buffer . If an IOException occurs it is wrapped in a ResourceIOException . |
624 | private static String readResourceLine ( DocPath docPath , BufferedReader in ) throws ResourceIOException { try { return in . readLine ( ) ; } catch ( IOException e ) { throw new ResourceIOException ( docPath , e ) ; } } | Reads a line of characters from an input stream opened from a given resource . If an IOException occurs it is wrapped in a ResourceIOException . |
625 | public static < A extends Annotation > A generateAnnotation ( Attribute . Compound anno , Class < A > annoType ) { AnnotationProxyMaker apm = new AnnotationProxyMaker ( anno , annoType ) ; return annoType . cast ( apm . generateAnnotation ( ) ) ; } | Returns a dynamic proxy for an annotation mirror . |
626 | private Map < String , Object > getAllReflectedValues ( ) { Map < String , Object > res = new LinkedHashMap < > ( ) ; for ( Map . Entry < MethodSymbol , Attribute > entry : getAllValues ( ) . entrySet ( ) ) { MethodSymbol meth = entry . getKey ( ) ; Object value = generateValue ( meth , entry . getValue ( ) ) ; if ( va... | Returns a map from element names to their values in dynamic proxy return form . Includes all elements whether explicit or defaulted . |
627 | private Object generateValue ( MethodSymbol meth , Attribute attr ) { ValueVisitor vv = new ValueVisitor ( meth ) ; return vv . getValue ( attr ) ; } | Converts an element value to its dynamic proxy return form . Returns an exception proxy on some errors but may return null if a useful exception cannot or should not be generated at this point . |
628 | private void checkTagName ( String name ) { if ( standardTags . contains ( name ) ) { overridenStandardTags . add ( name ) ; } else { if ( name . indexOf ( '.' ) == - 1 ) { potentiallyConflictingTags . add ( name ) ; } unseenCustomTags . add ( name ) ; } } | Given a tag name add it to the set of tags it belongs to . |
629 | private void initCustomTagletArrays ( ) { Iterator < Taglet > it = customTags . values ( ) . iterator ( ) ; ArrayList < Taglet > pTags = new ArrayList < > ( customTags . size ( ) ) ; ArrayList < Taglet > tTags = new ArrayList < > ( customTags . size ( ) ) ; ArrayList < Taglet > fTags = new ArrayList < > ( customTags . ... | Initialize the custom tag arrays . |
630 | private void initJavaFXTaglets ( ) { addStandardTaglet ( new PropertyGetterTaglet ( ) ) ; addStandardTaglet ( new PropertySetterTaglet ( ) ) ; addStandardTaglet ( new SimpleTaglet ( "propertyDescription" , message . getText ( "doclet.PropertyDescription" ) , SimpleTaglet . FIELD + SimpleTaglet . METHOD ) ) ; addStandar... | Initialize JavaFX - related tags . |
631 | public Taglet getTaglet ( String name ) { if ( name . indexOf ( "@" ) == 0 ) { return customTags . get ( name . substring ( 1 ) ) ; } else { return customTags . get ( name ) ; } } | Given the name of a tag return the corresponding taglet . Return null if the tag is unknown . |
632 | public Content getFieldsContentHeader ( boolean isLastContent ) { HtmlTree li = new HtmlTree ( HtmlTag . LI ) ; if ( isLastContent ) li . addStyle ( HtmlStyle . blockListLast ) ; else li . addStyle ( HtmlStyle . blockList ) ; return li ; } | Return the header for serializable fields content section . |
633 | public Content getSerializableFields ( String heading , Content serializableFieldsTree ) { HtmlTree li = new HtmlTree ( HtmlTag . LI ) ; li . addStyle ( HtmlStyle . blockList ) ; if ( serializableFieldsTree . isValid ( ) ) { Content headingContent = new StringContent ( heading ) ; Content serialHeading = HtmlTree . HEA... | Add serializable fields . |
634 | public Set < SourceVersion > getSourceVersions ( ) { return Collections . unmodifiableSet ( EnumSet . range ( SourceVersion . RELEASE_9 , SourceVersion . latest ( ) ) ) ; } | Returns the source versions of the jshell tool . |
635 | public com . sun . javadoc . Type [ ] bounds ( ) { return TypeMaker . getTypes ( env , getBounds ( ( TypeVar ) type , env ) ) ; } | Return the bounds of this type variable . |
636 | static String typeVarToString ( DocEnv env , TypeVar v , boolean full ) { StringBuilder s = new StringBuilder ( v . toString ( ) ) ; List < Type > bounds = getBounds ( v , env ) ; if ( bounds . nonEmpty ( ) ) { boolean first = true ; for ( Type b : bounds ) { s . append ( first ? " extends " : " & " ) ; s . append ( Ty... | Return the string form of a type variable along with any extends clause . Class names are qualified if full is true . |
637 | private static List < Type > getBounds ( TypeVar v , DocEnv env ) { final Type upperBound = v . getUpperBound ( ) ; Name boundname = upperBound . tsym . getQualifiedName ( ) ; if ( boundname == boundname . table . names . java_lang_Object && ! upperBound . isAnnotated ( ) ) { return List . nil ( ) ; } else { return env... | Get the bounds of a type variable as listed in the extends clause . |
638 | private Iterable < Path > getPathEntries ( String searchPath , Path emptyPathDefault ) { ListBuffer < Path > entries = new ListBuffer < > ( ) ; for ( String s : searchPath . split ( Pattern . quote ( File . pathSeparator ) , - 1 ) ) { if ( s . isEmpty ( ) ) { if ( emptyPathDefault != null ) { entries . add ( emptyPathD... | Split a search path into its elements . If emptyPathDefault is not null all empty elements in the path including empty elements at either end of the path will be replaced with the value of emptyPathDefault . |
639 | private boolean isArchive ( Path file ) { String n = StringUtils . toLowerCase ( file . getFileName ( ) . toString ( ) ) ; return fsInfo . isFile ( file ) && ( n . endsWith ( ".jar" ) || n . endsWith ( ".zip" ) ) ; } | Is this the name of an archive file? |
640 | public void addDir ( String dirName ) { Path dir = Paths . get ( dirName ) ; if ( Files . isDirectory ( dir ) ) { list . add ( new DirPathEntry ( dir ) ) ; } } | Adds a directory to this finder s search path ignoring errors . |
641 | public void addJar ( String jarName ) { try { list . add ( new JarPathEntry ( new JarFile ( jarName ) ) ) ; } catch ( IOException ignore ) { } } | Adds a jar file to this finder s search path ignoring errors . |
642 | public ClassFile find ( String className ) { for ( PathEntry pe : list ) { ClassFile cf = pe . find ( className ) ; if ( cf != null ) { return cf ; } } return null ; } | Searches the class path for a class with the given name returning a ClassFile for it . Returns null if not found . |
643 | String next ( ) { while ( true ) { nextToken ( ) ; if ( sval != null && ! isQuoted ( ) && sval . startsWith ( "-" ) ) { String opt = sval . startsWith ( "--" ) ? sval . substring ( 1 ) : sval ; foundOption ( opt ) ; } else { break ; } } return sval ; } | Return the next non - option argument . Encountered options are stored . |
644 | void allowedOptions ( String ... opts ) { for ( String opt : opts ) { options . putIfAbsent ( opt , false ) ; } } | Set the allowed options . Must be called before any options would be read and before calling any of the option functionality below . |
645 | boolean hasOption ( String opt ) { Boolean has = options . get ( opt ) ; if ( has == null ) { throw new InternalError ( "hasOption called before allowedOptions or on bad option" ) ; } return has ; } | Has the specified option been encountered . |
646 | String remainder ( ) { List < String > rem = new ArrayList < > ( ) ; while ( next ( ) != null ) { rem . add ( sval ) ; } return String . join ( " " , rem ) ; } | Consume the remainder of the input . This is useful to sure all options have been encountered and to check to unexpected additional non - option input . |
647 | public void nextToken ( ) { byte ct [ ] = ctype ; int c ; int lctype ; sval = null ; isQuoted = false ; do { c = read ( ) ; if ( c < 0 ) { return ; } lctype = ( c < 256 ) ? ct [ c ] : unicode2ctype ( c ) ; } while ( lctype == CT_WHITESPACE ) ; if ( lctype == CT_ALPHA ) { int i = 0 ; do { if ( i >= buf . length ) { buf ... | Parses the next token of this tokenizer . |
648 | public static Printer createStandardPrinter ( final Messages messages ) { return new Printer ( ) { protected String localize ( Locale locale , String key , Object ... args ) { return messages . getLocalizedString ( locale , key , args ) ; } protected String capturedVarId ( CapturedType t , Locale locale ) { return ( t ... | Create a printer with default i18n support provided by Messages . By default captured types ids are generated using hashcode . |
649 | public String visitTypes ( List < Type > ts , Locale locale ) { ListBuffer < String > sbuf = new ListBuffer < > ( ) ; for ( Type t : ts ) { sbuf . append ( visit ( t , locale ) ) ; } return sbuf . toList ( ) . toString ( ) ; } | Get a localized string representation for all the types in the input list . |
650 | protected String printMethodArgs ( List < Type > args , boolean varArgs , Locale locale ) { if ( ! varArgs ) { return visitTypes ( args , locale ) ; } else { StringBuilder buf = new StringBuilder ( ) ; while ( args . tail . nonEmpty ( ) ) { buf . append ( visit ( args . head , locale ) ) ; args = args . tail ; buf . ap... | Converts a set of method argument types into their corresponding localized string representation . |
651 | String encode ( ) { List < String > el = new ArrayList < > ( ) ; el . add ( name ) ; el . add ( String . valueOf ( commandFluff ) ) ; el . add ( prompt ) ; el . add ( continuationPrompt ) ; for ( Entry < String , List < Setting > > es : cases . entrySet ( ) ) { el . add ( es . getKey ( ) ) ; el . add ( "(" ) ; for ( Se... | Encodes the mode into a String so it can be saved in Preferences . |
652 | String format ( String field , long bits ) { List < Setting > settings = cases . get ( field ) ; if ( settings == null ) { return "" ; } String format = null ; for ( int i = settings . size ( ) - 1 ; i >= 0 ; -- i ) { Setting ing = settings . get ( i ) ; long mask = ing . enumBits ; if ( ( bits & mask ) == bits ) { for... | Lookup format Replace fields with context specific formats . |
653 | public ModuleMode getModuleMode ( ) { switch ( accessFilter . getAccessValue ( ElementKind . MODULE ) ) { case PACKAGE : case PRIVATE : return DocletEnvironment . ModuleMode . ALL ; default : return DocletEnvironment . ModuleMode . API ; } } | Returns the module documentation level mode . |
654 | public Set < ? extends Element > getSpecifiedElements ( ) { if ( specifiedElements == null ) { Set < Element > result = new LinkedHashSet < > ( ) ; result . addAll ( specifiedModuleElements ) ; result . addAll ( specifiedPackageElements ) ; result . addAll ( specifiedTypeElements ) ; specifiedElements = Collections . u... | Returns a set of elements specified on the command line including any inner classes . |
655 | void analyze ( ) throws ToolException { computeSpecifiedModules ( ) ; computeSpecifiedPackages ( ) ; computeSpecifiedTypes ( ) ; Set < PackageElement > expandedModulePackages = computeModulePackages ( ) ; initializeIncludedSets ( expandedModulePackages ) ; } | Performs the final computation and freezes the collections . This is a terminal operation thus no further modifications are allowed to the specified data sets . |
656 | public List < String > getMetaKeywordsForModule ( ModuleElement mdle ) { if ( config . keywords ) { return Arrays . asList ( mdle . getQualifiedName ( ) + " " + "module" ) ; } else { return Collections . emptyList ( ) ; } } | Get the module keywords . |
657 | public Iterable < ? extends Completion > getCompletions ( Element element , AnnotationMirror annotation , ExecutableElement member , String userText ) { return Collections . emptyList ( ) ; } | Returns an empty iterable of completions . |
658 | private void addAllModulesFrameTag ( Content contentTree ) { HtmlTree frame = HtmlTree . IFRAME ( DocPaths . MODULE_OVERVIEW_FRAME . getPath ( ) , "packageListFrame" , configuration . getText ( "doclet.All_Modules" ) ) ; HtmlTree leftTop = HtmlTree . DIV ( HtmlStyle . leftTop , frame ) ; contentTree . addContent ( left... | Add the IFRAME tag for the frame that lists all modules . |
659 | protected void lexError ( int pos , String key , Object ... args ) { log . error ( pos , key , args ) ; tk = TokenKind . ERROR ; errPos = pos ; } | Report an error at the given position using the provided arguments . |
660 | private void scanLitChar ( int pos ) { if ( reader . ch == '\\' ) { if ( reader . peekChar ( ) == '\\' && ! reader . isUnicode ( ) ) { reader . skipChar ( ) ; reader . putChar ( '\\' , true ) ; } else { reader . scanChar ( ) ; switch ( reader . ch ) { case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : ca... | Read next character in character or string literal and copy into sbuf . |
661 | private void scanIdent ( ) { boolean isJavaIdentifierPart ; char high ; reader . putChar ( true ) ; do { switch ( reader . ch ) { case 'A' : case 'B' : case 'C' : case 'D' : case 'E' : case 'F' : case 'G' : case 'H' : case 'I' : case 'J' : case 'K' : case 'L' : case 'M' : case 'N' : case 'O' : case 'P' : case 'Q' : cas... | Read an identifier . |
662 | private void scanOperator ( ) { while ( true ) { reader . putChar ( false ) ; Name newname = reader . name ( ) ; TokenKind tk1 = tokens . lookupKind ( newname ) ; if ( tk1 == TokenKind . IDENTIFIER ) { reader . sp -- ; break ; } tk = tk1 ; reader . scanChar ( ) ; if ( ! isSpecial ( reader . ch ) ) break ; } } | Read longest possible sequence of special characters and convert to token . |
663 | protected void processWhiteSpace ( int pos , int endPos ) { if ( scannerDebug ) System . out . println ( "processWhitespace(" + pos + "," + endPos + ")=|" + new String ( reader . getRawCharacters ( pos , endPos ) ) + "|" ) ; } | Called when a complete whitespace run has been scanned . pos and endPos will mark the whitespace boundary . |
664 | public Position . LineMap getLineMap ( ) { return Position . makeLineMap ( reader . getRawCharacters ( ) , reader . buflen , false ) ; } | Build a map for translating between line numbers and positions in the input . |
665 | public static com . sun . javadoc . Type [ ] getTypes ( DocEnv env , List < Type > ts ) { return getTypes ( env , ts , new com . sun . javadoc . Type [ ts . length ( ) ] ) ; } | Convert a list of javac types into an array of javadoc types . |
666 | public static com . sun . javadoc . Type [ ] getTypes ( DocEnv env , List < Type > ts , com . sun . javadoc . Type res [ ] ) { int i = 0 ; for ( Type t : ts ) { res [ i ++ ] = getType ( env , t ) ; } return res ; } | Like the above version but use and return the array given . |
667 | static String typeParametersString ( DocEnv env , Symbol sym , boolean full ) { if ( env . legacyDoclet || sym . type . getTypeArguments ( ) . isEmpty ( ) ) { return "" ; } StringBuilder s = new StringBuilder ( ) ; for ( Type t : sym . type . getTypeArguments ( ) ) { s . append ( s . length ( ) == 0 ? "<" : ", " ) ; s ... | Return the formal type parameters of a class or method as an angle - bracketed string . Each parameter is a type variable with optional bounds . Class names are qualified if full is true . Return if there are no type parameters or we re hiding generics . |
668 | static String typeArgumentsString ( DocEnv env , ClassType cl , boolean full ) { if ( env . legacyDoclet || cl . getTypeArguments ( ) . isEmpty ( ) ) { return "" ; } StringBuilder s = new StringBuilder ( ) ; for ( Type t : cl . getTypeArguments ( ) ) { s . append ( s . length ( ) == 0 ? "<" : ", " ) ; s . append ( getT... | Return the actual type arguments of a parameterized type as an angle - bracketed string . Class name are qualified if full is true . Return if there are no type arguments or we re hiding generics . |
669 | public void buildClassInfo ( XMLNode node , Content classContentTree ) { Content classInfoTree = writer . getClassInfoTreeHeader ( ) ; buildChildren ( node , classInfoTree ) ; classContentTree . addContent ( writer . getClassInfo ( classInfoTree ) ) ; } | Build the class information tree documentation . |
670 | public void buildMemberSummary ( XMLNode node , Content classContentTree ) throws Exception { Content memberSummaryTree = writer . getMemberTreeHeader ( ) ; configuration . getBuilderFactory ( ) . getMemberSummaryBuilder ( writer ) . buildChildren ( node , memberSummaryTree ) ; classContentTree . addContent ( writer . ... | Build the member summary contents of the page . |
671 | public void buildEnumConstantsDetails ( XMLNode node , Content memberDetailsTree ) throws Exception { configuration . getBuilderFactory ( ) . getEnumConstantsBuilder ( writer ) . buildChildren ( node , memberDetailsTree ) ; } | Build the enum constants documentation . |
672 | private Collection < ClassDoc > subinterfaces ( ClassDoc cd ) { Collection < ClassDoc > ret = classToSubinterface . get ( cd . qualifiedName ( ) ) ; if ( ret == null ) { ret = new TreeSet < > ( utils . makeComparatorForClassUse ( ) ) ; SortedSet < ClassDoc > subs = classtree . subinterfaces ( cd ) ; if ( subs != null )... | Return all subinterfaces of an interface AND fill - in classToSubinterface map . |
673 | public static ScannerFactory instance ( Context context ) { ScannerFactory instance = context . get ( scannerFactoryKey ) ; if ( instance == null ) instance = new ScannerFactory ( context ) ; return instance ; } | Get the Factory instance for this context . |
674 | public Content getTableCaption ( Set < MethodTypes > methodTypes ) { Content tabbedCaption = new HtmlTree ( HtmlTag . CAPTION ) ; for ( MethodTypes type : methodTypes ) { Content captionSpan ; Content span ; if ( type . tableTabs ( ) . isDefaultTab ( ) ) { captionSpan = HtmlTree . SPAN ( configuration . getContent ( ty... | Get the summary table caption . |
675 | public Content getMethodTypeLinks ( MethodTypes methodType ) { String jsShow = "javascript:show(" + methodType . tableTabs ( ) . value ( ) + ");" ; HtmlTree link = HtmlTree . A ( jsShow , configuration . getContent ( methodType . tableTabs ( ) . resourceKey ( ) ) ) ; return link ; } | Get the method type links for the table caption . |
676 | void generateIndexFile ( ) throws DocFileIOException { Content htmlDocType = configuration . isOutputHtml5 ( ) ? DocType . HTML5 : DocType . TRANSITIONAL ; Content htmlComment = new Comment ( configuration . getText ( "doclet.New_Page" ) ) ; Content head = new HtmlTree ( HtmlTag . HEAD ) ; head . addContent ( getGenera... | Generate an index file that redirects to an alternate file . |
677 | protected void build ( XMLNode node , Content contentTree ) throws DocletException { String component = node . name ; try { String methodName = "build" + component ; if ( DEBUG ) { configuration . reporter . print ( ERROR , "DEBUG: " + getClass ( ) . getName ( ) + "." + methodName ) ; } Method method = getClass ( ) . g... | Build the documentation as specified by the given XML element . |
678 | protected void buildChildren ( XMLNode node , Content contentTree ) throws DocletException { for ( XMLNode child : node . children ) build ( child , contentTree ) ; } | Build the documentation as specified by the children of the given XML element . |
679 | Type fold ( int opcode , List < Type > argtypes ) { int argCount = argtypes . length ( ) ; if ( argCount == 1 ) return fold1 ( opcode , argtypes . head ) ; else if ( argCount == 2 ) return fold2 ( opcode , argtypes . head , argtypes . tail . head ) ; else throw new AssertionError ( ) ; } | Fold binary or unary operation returning constant type reflecting the operations result . Return null if fold failed due to an arithmetic exception . |
680 | Type coerce ( Type etype , Type ttype ) { if ( etype . tsym . type == ttype . tsym . type ) return etype ; if ( etype . isNumeric ( ) ) { Object n = etype . constValue ( ) ; switch ( ttype . getTag ( ) ) { case BYTE : return syms . byteType . constType ( 0 + ( byte ) intValue ( n ) ) ; case CHAR : return syms . charTyp... | Coerce constant type to target type . |
681 | protected void print ( Object s ) throws IOException { out . write ( Convert . escapeUnicode ( s . toString ( ) ) ) ; } | Print string replacing all non - ascii character with unicode escapes . |
682 | public void print ( List < ? extends DocTree > list ) throws IOException { for ( DocTree t : list ) { print ( t ) ; } } | Print list . |
683 | protected void print ( List < ? extends DocTree > list , String sep ) throws IOException { if ( list . isEmpty ( ) ) return ; boolean first = true ; for ( DocTree t : list ) { if ( ! first ) print ( sep ) ; print ( t ) ; first = false ; } } | Print list . with separators |
684 | public static Lint instance ( Context context ) { Lint instance = context . get ( lintKey ) ; if ( instance == null ) instance = new Lint ( context ) ; return instance ; } | Get the root Lint instance . |
685 | public Lint augment ( Symbol sym ) { Lint l = augmentor . augment ( this , sym . getDeclarationAttributes ( ) ) ; if ( sym . isDeprecated ( ) ) { if ( l == this ) l = new Lint ( this ) ; l . values . remove ( LintCategory . DEPRECATION ) ; l . suppressedValues . add ( LintCategory . DEPRECATION ) ; } return l ; } | Returns the result of combining the values in this object with the metadata on the given symbol . |
686 | public Lint suppress ( LintCategory ... lc ) { Lint l = new Lint ( this ) ; l . values . removeAll ( Arrays . asList ( lc ) ) ; l . suppressedValues . addAll ( Arrays . asList ( lc ) ) ; return l ; } | Returns a new Lint that has the given LintCategorys suppressed . |
687 | public Content getModuleHeader ( String heading ) { HtmlTree bodyTree = getBody ( true , getWindowTitle ( mdle . getQualifiedName ( ) . toString ( ) ) ) ; HtmlTree htmlTree = ( configuration . allowTag ( HtmlTag . HEADER ) ) ? HtmlTree . HEADER ( ) : bodyTree ; addTop ( htmlTree ) ; addNavLinks ( true , htmlTree ) ; if... | Get the module header . |
688 | public Content getSummaryTree ( Content summaryContentTree ) { HtmlTree ul = HtmlTree . UL ( HtmlStyle . blockList , summaryContentTree ) ; return ul ; } | Get the summary tree . |
689 | public Module toNormalModule ( Map < String , Boolean > requires ) { if ( ! isAutomatic ( ) ) { throw new IllegalArgumentException ( name ( ) + " not an automatic module" ) ; } return new NormalModule ( this , requires ) ; } | Converts this module to a normal module with the given dependences |
690 | public boolean isExported ( String pn ) { return exports . containsKey ( pn ) && exports . get ( pn ) . isEmpty ( ) ; } | Tests if the package of the given name is exported . |
691 | public boolean isExported ( String pn , String target ) { return isExported ( pn ) || exports . containsKey ( pn ) && exports . get ( pn ) . contains ( target ) ; } | Tests if the package of the given name is exported to the target in a qualified fashion . |
692 | public boolean isOpen ( String pn ) { return opens . containsKey ( pn ) && opens . get ( pn ) . isEmpty ( ) ; } | Tests if the package of the given name is open . |
693 | public boolean isOpen ( String pn , String target ) { return isOpen ( pn ) || opens . containsKey ( pn ) && opens . get ( pn ) . contains ( target ) ; } | Tests if the package of the given name is open to the target in a qualified fashion . |
694 | public < Z > Type map ( TypeMapping < Z > mapping , Z arg ) { return mapping . visit ( this , arg ) ; } | map a type function over all immediate descendants of this type |
695 | public static List < Type > baseTypes ( List < Type > ts ) { if ( ts . nonEmpty ( ) ) { Type t = ts . head . baseType ( ) ; List < Type > baseTypes = baseTypes ( ts . tail ) ; if ( t != ts . head || baseTypes != ts . tail ) return baseTypes . prepend ( t ) ; } return ts ; } | Return the base types of a list of types . |
696 | public Content getNonBreakResource ( String key ) { String text = configuration . getText ( key ) ; Content c = configuration . newContent ( ) ; int start = 0 ; int p ; while ( ( p = text . indexOf ( " " , start ) ) != - 1 ) { c . addContent ( text . substring ( start , p ) ) ; c . addContent ( RawHtml . nbsp ) ; start... | Get the configuration string as a content replacing spaces with non - breaking spaces . |
697 | public Attribute . Compound attribute ( Symbol anno ) { for ( Attribute . Compound a : getRawAttributes ( ) ) { if ( a . type . tsym == anno ) return a ; } return null ; } | Fetch a particular annotation from a symbol . |
698 | public Symbol location ( ) { if ( owner . name == null || ( owner . name . isEmpty ( ) && ( owner . flags ( ) & BLOCK ) == 0 && owner . kind != PCK && owner . kind != TYP ) ) { return null ; } return owner ; } | A Java source description of the location of this symbol ; used for error reporting . |
699 | public Type erasure ( Types types ) { if ( erasure_field == null ) erasure_field = types . erasure ( type ) ; return erasure_field ; } | The symbol s erased type . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.