59 |
|
|
60 |
// Return constructors in class. |
// Return constructors in class. |
61 |
public ConstructorDoc[] constructors() { |
public ConstructorDoc[] constructors() { |
62 |
return constructors; |
return constructors(true); |
63 |
|
} |
64 |
|
|
65 |
|
public ConstructorDoc[] constructors(boolean filter) { |
66 |
|
return filter ? filteredConstructors : unfilteredConstructors; |
67 |
} |
} |
68 |
|
|
69 |
// Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields. |
// Return true if Serializable fields are explicitly defined with the special class member serialPersistentFields. |
73 |
|
|
74 |
// Return fields in class. |
// Return fields in class. |
75 |
public FieldDoc[] fields() { |
public FieldDoc[] fields() { |
76 |
return fields; |
return fields(true); |
77 |
|
} |
78 |
|
|
79 |
|
public FieldDoc[] fields(boolean filter) { |
80 |
|
return filter ? filteredFields : unfilteredFields; |
81 |
} |
} |
82 |
|
|
83 |
/** |
/** |
207 |
|
|
208 |
// Return methods in class. |
// Return methods in class. |
209 |
public MethodDoc[] methods() { |
public MethodDoc[] methods() { |
210 |
return methods; |
return methods(true); |
211 |
|
} |
212 |
|
|
213 |
|
// Return methods in class. |
214 |
|
public MethodDoc[] methods(boolean filter) { |
215 |
|
return filter ? filteredMethods : unfilteredMethods; |
216 |
} |
} |
217 |
|
|
218 |
// Return the Serializable fields of class. Return either a list of default fields documented by serial tag or return a single FieldDoc for serialPersistentField member. |
// Return the Serializable fields of class. Return either a list of default fields documented by serial tag or return a single FieldDoc for serialPersistentField member. |
404 |
} |
} |
405 |
|
|
406 |
public void setFields(FieldDoc[] fields) { |
public void setFields(FieldDoc[] fields) { |
407 |
this.fields=fields; |
this.unfilteredFields=fields; |
408 |
|
} |
409 |
|
|
410 |
|
public void setFilteredFields(FieldDoc[] fields) { |
411 |
|
this.filteredFields=fields; |
412 |
} |
} |
413 |
|
|
414 |
public void setSerializableFields(FieldDoc[] sfields) { |
public void setSerializableFields(FieldDoc[] sfields) { |
416 |
} |
} |
417 |
|
|
418 |
public void setMethods(MethodDoc[] methods) { |
public void setMethods(MethodDoc[] methods) { |
419 |
this.methods=methods; |
this.unfilteredMethods=methods; |
420 |
|
} |
421 |
|
|
422 |
|
public void setFilteredMethods(MethodDoc[] methods) { |
423 |
|
this.filteredMethods=methods; |
424 |
} |
} |
425 |
|
|
426 |
public void setConstructors(ConstructorDoc[] constructors) { |
public void setConstructors(ConstructorDoc[] constructors) { |
427 |
this.constructors=constructors; |
this.unfilteredConstructors=constructors; |
428 |
|
} |
429 |
|
|
430 |
|
public void setFilteredConstructors(ConstructorDoc[] constructors) { |
431 |
|
this.filteredConstructors=constructors; |
432 |
} |
} |
433 |
|
|
434 |
// Returns the name of this Doc item. |
// Returns the name of this Doc item. |
505 |
} |
} |
506 |
} |
} |
507 |
|
|
508 |
if (fields!=null) { |
if (unfilteredFields!=null) { |
509 |
for (int i=0; i<fields.length; ++i) { |
for (int i=0; i<unfilteredFields.length; ++i) { |
510 |
((FieldDocImpl)fields[i]).resolve(); |
((FieldDocImpl)unfilteredFields[i]).resolve(); |
511 |
if (fields[i].name().equals("serialPersistentField")) { |
if (unfilteredFields[i].name().equals("serialPersistentField")) { |
512 |
serialPersistentField=new FieldDoc[]{fields[i]}; |
serialPersistentField=new FieldDoc[]{unfilteredFields[i]}; |
513 |
definesSerializableFields=true; |
definesSerializableFields=true; |
514 |
} |
} |
515 |
} |
} |
516 |
} |
} |
517 |
|
|
518 |
if (methods!=null) { |
if (unfilteredMethods!=null) { |
519 |
for (int i=0; i<methods.length; ++i) { |
for (int i=0; i<unfilteredMethods.length; ++i) { |
520 |
((MethodDocImpl)methods[i]).resolve(); |
((MethodDocImpl)unfilteredMethods[i]).resolve(); |
521 |
} |
} |
522 |
} |
} |
523 |
|
|
524 |
if (constructors!=null) { |
if (unfilteredConstructors!=null) { |
525 |
for (int i=0; i<constructors.length; ++i) { |
for (int i=0; i<unfilteredConstructors.length; ++i) { |
526 |
((ConstructorDocImpl)constructors[i]).resolve(); |
((ConstructorDocImpl)unfilteredConstructors[i]).resolve(); |
527 |
} |
} |
528 |
} |
} |
529 |
|
|
549 |
} |
} |
550 |
|
|
551 |
public FieldDoc findField(String fieldName) { |
public FieldDoc findField(String fieldName) { |
552 |
for (int i=0; i<fields.length; ++i) { |
for (int i=0; i<filteredFields.length; ++i) { |
553 |
if (fields[i].name().equals(fieldName)) { |
if (filteredFields[i].name().equals(fieldName)) { |
554 |
return fields[i]; |
return filteredFields[i]; |
555 |
} |
} |
556 |
} |
} |
557 |
return null; |
return null; |
561 |
|
|
562 |
super.resolveComments(); |
super.resolveComments(); |
563 |
|
|
564 |
if (null != fields) { |
if (null != unfilteredFields) { |
565 |
for (int i=0; i<fields.length; ++i) { |
for (int i=0; i<unfilteredFields.length; ++i) { |
566 |
((FieldDocImpl)fields[i]).resolveComments(); |
((FieldDocImpl)unfilteredFields[i]).resolveComments(); |
567 |
} |
} |
568 |
} |
} |
569 |
|
|
572 |
((FieldDocImpl)serializableFields[i]).resolveComments(); |
((FieldDocImpl)serializableFields[i]).resolveComments(); |
573 |
} |
} |
574 |
} |
} |
575 |
if (null != methods) { |
if (null != unfilteredMethods) { |
576 |
for (int i=0; i<methods.length; ++i) { |
for (int i=0; i<unfilteredMethods.length; ++i) { |
577 |
((MethodDocImpl)methods[i]).resolveComments(); |
((MethodDocImpl)unfilteredMethods[i]).resolveComments(); |
578 |
} |
} |
579 |
} |
} |
580 |
if (null != constructors) { |
if (null != unfilteredConstructors) { |
581 |
for (int i=0; i<constructors.length; ++i) { |
for (int i=0; i<unfilteredConstructors.length; ++i) { |
582 |
((ConstructorDocImpl)constructors[i]).resolveComments(); |
((ConstructorDocImpl)unfilteredConstructors[i]).resolveComments(); |
583 |
} |
} |
584 |
} |
} |
585 |
|
|
592 |
private boolean isAbstract; |
private boolean isAbstract; |
593 |
private boolean isInterface; |
private boolean isInterface; |
594 |
private ClassDoc[] interfaces; |
private ClassDoc[] interfaces; |
595 |
private FieldDoc[] fields; |
private FieldDoc[] filteredFields; |
596 |
|
private FieldDoc[] unfilteredFields; |
597 |
private FieldDoc[] serializableFields; |
private FieldDoc[] serializableFields; |
598 |
private MethodDoc[] methods; |
private MethodDoc[] filteredMethods; |
599 |
private ConstructorDoc[] constructors; |
private MethodDoc[] unfilteredMethods; |
600 |
|
private ConstructorDoc[] filteredConstructors; |
601 |
|
private ConstructorDoc[] unfilteredConstructors; |
602 |
|
|
603 |
private boolean resolved=false; |
private boolean resolved=false; |
604 |
|
|
763 |
} |
} |
764 |
|
|
765 |
public ConstructorDoc findConstructor(String name, String signature) { |
public ConstructorDoc findConstructor(String name, String signature) { |
766 |
if (null != constructors) { |
if (null != filteredConstructors) { |
767 |
for (int i=0; i<constructors.length; ++i) { |
for (int i=0; i<filteredConstructors.length; ++i) { |
768 |
if (constructors[i].name().equals(name) && constructors[i].signature().equals(signature)) |
ConstructorDoc constructor = filteredConstructors[i]; |
769 |
return constructors[i]; |
if (constructor.name().equals(name) && constructor.signature().equals(signature)) |
770 |
|
return constructor; |
771 |
} |
} |
772 |
} |
} |
773 |
return null; |
return null; |
815 |
} |
} |
816 |
|
|
817 |
public MethodDoc findMethod(String name, String signature) { |
public MethodDoc findMethod(String name, String signature) { |
818 |
if (null != methods) { |
if (null != filteredMethods) { |
819 |
for (int i=0; i<methods.length; ++i) { |
for (int i=0; i<filteredMethods.length; ++i) { |
820 |
if (methods[i].name().equals(name) && methods[i].signature().equals(signature)) |
MethodDoc method = filteredMethods[i]; |
821 |
return methods[i]; |
if (method.name().equals(name) && method.signature().equals(signature)) |
822 |
|
return method; |
823 |
} |
} |
824 |
} |
} |
825 |
return null; |
return null; |
861 |
{ |
{ |
862 |
return baseClassDoc; |
return baseClassDoc; |
863 |
} |
} |
864 |
|
|
865 |
|
public FieldDoc getFieldDoc(String name) |
866 |
|
{ |
867 |
|
for (int i=0; i<unfilteredFields.length; ++i) { |
868 |
|
if (name.equals(unfilteredFields[i].name())) { |
869 |
|
return unfilteredFields[i]; |
870 |
|
} |
871 |
|
} |
872 |
|
return null; |
873 |
|
} |
874 |
|
|
875 |
|
public MethodDoc getMethodDoc(String name, String signature) |
876 |
|
{ |
877 |
|
for (int i=0; i<unfilteredMethods.length; ++i) { |
878 |
|
if (name.equals(unfilteredMethods[i].name()) |
879 |
|
&& signature.equals(unfilteredMethods[i].signature())) { |
880 |
|
return unfilteredMethods[i]; |
881 |
|
} |
882 |
|
} |
883 |
|
return null; |
884 |
|
} |
885 |
|
|
886 |
|
|
887 |
|
public ConstructorDoc getConstructorDoc(String signature) |
888 |
|
{ |
889 |
|
for (int i=0; i<unfilteredConstructors.length; ++i) { |
890 |
|
if (signature.equals(unfilteredConstructors[i].signature())) { |
891 |
|
return unfilteredConstructors[i]; |
892 |
|
} |
893 |
|
} |
894 |
|
return null; |
895 |
|
} |
896 |
} |
} |
897 |
|
|